So this is a question I thought I had answered, but may have gotten eaten by a browser refresh or OS crash, because I can’t find it anywhere in my archives.
So where did the Yunkish army – which keep in mind, is only one part of a larger coalition which includes the forces of New Ghis, Qarth, Elyria, Tolos, and eventually Volantis – come from?
Well, a lot of them are mercenaries who the Wise Masters hired – the Company of the Cat, the Long Lances, the Second Sons, and originally the Windblown – because while Dany redistributed a part of their wealth, her terms that the slaves should be given “as much food, clothing, coin, and goods as he or she can carry” would leave the bulk untouched.
But I imagine your main question is about these soldiers:
“There were more, near as mad or worse: Lord Wobblecheeks, the Drunken Conqueror, the Beastmaster, Pudding Face, the Rabbit, the Charioteer, the Perfumed Hero. Some had twenty soldiers, some two hundred or two thousand, all slaves they had trained and equipped themselves.”
I think there are two explanations for where these slave-soldiers came from. The first is that the Yunkish simply bought them on the open market when they re-established slavery and began re-arming for war against Cleon. Certainly this explains sub-groups like the Clanker Lords.
However, this explanation doesn’t work for Yunkish commanders like the Little Pigeon and the Girl General, both of whom are described as having bred their soldiers, which requires multiple generations’ worth of time, and thus can’t have happened in the few months between Dany’s liberation of Yunkai and the second siege of Meereen.
My explanation for this latter group is that they were probably not in Yunkai when it was attacked. See, it’s rather unusual for Wise Masters to produce and train soldiers, since Astapor specializes in the Unsullied and Yunkai specializes in sex slaves. Given that they lead their soldiers in person rather than selling them to others, and that they’re ambitious for overall military command, my guess is that the Little Pigeon and the Girl General and their ilk were working as mercenaries elsewhere in Essos when Yunkai was attacked, and then came back home to take revenge on Dany.