The question is really unclear.
If you want the function to work on a specific instance it should be picked.
If the object is created within the function it can be referenced by using subevents.
If after the creation you want to do things to each object in the family, you can add a for each.
Point is, you want to sent the family or object as a parameter. To do this you'd have to know which object or family to use as parameter, right? So actually you have to do the picking before being able to set as parameter. Which is outside of the function, which makes your question questionable.
You could just choose to send a global variable as a parameter and within the function have a subevent that says if global variable is ... perform these actions. these actions could be family or object specific, ofcourse.