It's difficult to give an accurate answer in these types of cases as can vary depending on what you need to do:
Example:
How many families are we talking about?
What do you do if an object is part of two families?
If as you said you have only two families to deal with and 20 objects, then a quick idea could be:
On your Array store both (Object Name & Family Type)
Y = 0 -----------Store Object Name
Y = 1 -----------Store Family Type
Then to pick the correct family after creating the objects you could do a few else conditions checks.
---------------------------------------
However, if you have many families then you will have to make a lot else conditions, so to keep it cleaner may be a better idea to create Functions to keep everything organized.
Example:
Put all the objects in one Family = "Family_List" so we can pick the last created to extract the UID to pass it on inside the Function that we need to call.
You can keep your current family's.
Function = Family1_Initialization
Function = Family2_Initialization
And so on...
They will have a (Parameter = UID) so you can pass the last create UID to pick it again inside that function.
Should look something like this:
These ideas are just based on the current info you give.