Hi @Melker34804859labz,
Thanks so much for sharing this idea! I completely get why being able to 'draw' a custom lasso shape with the Pencil tool would be super useful for selecting irregular groups of objects.
Currently, Illustrator has the Lasso tool, but it works in a more freeform 'click and drag' way and doesn't let you build a closed shape like you described. Your suggestion sounds like a great feature request. Would you mind creating a UserVoice entry for this feature request? You can do that here: Adobe Illustrator.
Adding your idea there helps us track interest and prioritize it better, and you’ll also get notified of any updates.
Thanks so much for taking the time to share your feedback, and I look forward to seeing your post!
Abhishek