Sure, you can add other instance variables to that family, say TargetGroup and TargetLayer.
When family member is tapped, deactivate all popup groups and make all popup layers invisible, then activate only ButtonsFamily.TargetGroup and set ButtonsFamily.TargetLayer visible.
Or you can create an event that runs every 0.1 seconds for example, checks layers visibility, and activates/deactivates corresponding groups.
If you have lots of layers/groups, you can name them like PopupGroup1, PopupGroup2, PopupGroup3... PopupLayer1, PopupLayer2, PopupLayer3..
and disable them in a loop:
For "x"=1 to 20 ->
... Set group "PopupGroup"&loopindex deactivated
... Set layer "PopupGroup"&loopindex invisible