The most effective and flexible full army stack would be:
4 heavy infantry
4 heavy cavalry(3 if you have a general)
4 missile units(archers/peltasts...)
4 siege units(onagers...no ballistas coz they are pretty useless)
4 spears/pikes/hoplites...any 4 units that have a bonus against infantry.
This is one of the most flexible army arrangements. You could even remove some units from the siege units and missile units to make room for some cavalry archers.
If playing as greece, you might want to replace the heavy infantry with horse archers(greeks do not have any heavy infantry) OR you could put in 4 more hoplites as those are the strongest units of greece.
Just make sure you have some missile units, cavalry and speciality units of your faction(like cavalry for macedon).
Infantry is OBVIOUSLY needed, because you will always need foot soldiers.
This is a basic stack arrangement but its changes a lot with different factions.
The first arrangement of 5 unit types 4 each is perfect if playing as a roman faction. With that arrangement, you will never lose a battle as romans unless you try charging missile units into cavalry and charge cavalry on WALK mode into pikemen...and such things
Hope this helped!