I would base this on group-names.
Have an array with various groups and then make up various state-variables for each group.
Example:
state_groups = [group1,group2,group3]
group1_state = "state_guarding"
group1_mission = "mis_guard"
group1_objective = gamelogic_guard
group1_obj_pos = getpos gamelogic_guard
group2_state = "state_moving"
group2_mission = "mis_rearm"
group2_objective = ammocrate1
group2_obj_pos = getpos ammocrate1
group3_state = "state_moving"
group3_mission = "mis_destroy"
group3_objective = bunker1
group3_obj_pos = getpos bunker1
etc etc...
hope this is near what you have in mind