Scripting multiple npcs to spawn on one flag

I’ve been trying to find out how to do like what is in the Humans+Resistance tab of the spawn menu. The rebels, citizens, and refugees all spawn with different heads and I would like to know how to take that knowledge and add it to other categories and npcs. I am currently wanting to do the Halo 3 marines mod and make it where everytime I click on the flag, that it would spawn a different head.