you only want to have a list where you can find all the family names which their family members, right? Why not use a simple map for that, like this:
you can then use the map->getKeys to iterate with a loop over all family names, and get the objectReferences from each family string which gives you the family members.
in my screenshot the makeLiteralString is where your familyName from the struct will go.