Span of control is very important indeed. If you have a magical means of communication or clairvoyance then you can have your generals in charge of more troops and spread out over greater distances. (This could also provide for some plot points when your mages run out of batteries.) This also leads to a function of 'the law of unintended consequences.' If your general can control every aspect of the battle, he will. This is not necessarily a good thing. Trust me, I've watched it happen.
This also brings up the question of logistics and staff action. Logistics is the art and science of sustaining a fighting force. At the small level it is not difficult, troops can carry a few days of supplies on their backs. Beyond that, it gets hairy. Bringing supplies in and carrying waste out is a huge undertaking. Fresh water sources are critical and lack of them can bring an army to it's knees in a few days. Food is another thing. Also, there were typically a bunch of camp followers that were like a moving village or town that would set up as close to the army as possible. All sorts of 'services' could be found there. (A friend of mine told me about an exercise in Korea where every morning a little old man with coolers strapped to his bicycle would go right up to the line of troops and call out "Moon pie, Coke, one dollar!" How's that for security?)
But staff action is probably closer to the original question in the thread. As armies get bigger, they get harder to control. (Quick note on the phrase 'command and control.' It means the same thing as communications. Command = make things go, Control = make things stop. This is important unless you're a horde of barbarians.) Generals need to have a group of advisors. They will be divided out by specialty. A common staff will have your typical G functions; G-1 Admin/Personnel, G-2 Intelligence, G-3 Operations (i.e. the guy who really runs things for the general), G-4 Logistics (the busiest guy by far), and others. I think we're up to G-8 Comptroller now. This staff will do the work necessary to fight and win wars. They are the commander's thinking cap. Because they are usually behind the lines and mostly safe, they tend to disagree with the lower level commanders about best courses of action. Oh, and don't forget the Executive Officer, he manages the staff and gets into arguments with the 3.
However you want to organize your general staff is fine, just realize that even in medieval times the generals had some kind of staff to help run the army. You could also just bring in the lower level commanders to perform this function and give advice around their area of expertise; Cavalry, Infantry, Shock Troops, Engineers, etc. The problem with this is that the staff is a full time job and those commanders need to be with their troops.
Also, each level of command (each unit) is going to have a smaller version of the staff above it. At the company and platoon level this is no more than two or three, commander included. Today it is at the battalion level where you get a significant staff of 5-10 officers and their various sections. The size of unit staffs will be dependent on the span of control we've all mentioned above. If you have battalions a nothing more than maneuver units controlled by the general like pieces on a board, then you don't need a battalion staff. Basic rule: the bigger and more independent the unit is, the bigger the staff will have to be.
Want to talk about ranks?