There are lots and lots of books on this, with many options.
Personally, I saw two approaches I liked. One is basing it on EL (not HD!), the other is just winging it according to the needs of the story, using the battle as background instead of resolving it mecahnically.
For a fairly quick and easy EL-based combat resolution system, I admire Bad Axe Game's
GT Mass Combat system. You'll also want to purchase their
Gamemastering pdf for the EL calculations. (Total cost: 3.8 $) The latter alone can provide you with an estimate of casualties.
For a story-based resolution system, I hear good things of Heroes of Battle.
I'm not sure why you are interested in the encounters you listed given a 1500-5000 men army. If these are encounters between only NPCs, I'd arbitrarily make a ruling based on EL and tactics, perhaps using the GT Mass Combat system above.
If the encounters you listed are those where PCs are involved, they are not too lagre to handle with usual D&D rules without any real loss of speed. Have some 20 d20's on hand; that's an amount you can scoop up with both hands and throw. Divide the beasties into units of, say, 40 or less, and have all members of a unit use the same action in a round; make sure to have a small number of units. Make sure to do all the math before-hand, so you'll know all the DCs you need to reach with those d20's. Then it's just a matter of counting how many d20's reached the target number.
You can use average damage rolls to speed things up, or roll them when you feel like it (when, say, there is no DR so you just sum all things up); rolling a few and multiplying also works.
The thing that takes time is really determining DCs and actions and resolving spells, not throwing the dice. As long as you limit yourself to only a few units, you should be fine.
If you are asking for a generator for combat situation encounters, I think Heroes of Battle covers that. I don't know of another product that does.
Example of arbitrary ruling using just BAG's Gamemastering pdf:
40 fighters (lvl 1), 5 fighters (lvl 3), 1 fighter (lvl 7), 1 cleric (lvl 5)
VS
150 CR 1/2 monsters
The fighters have a Power of 159, the monsters 75 (just a quick CR-based calculation). The fighters should easily prevail, but lose half their resources. All things being equal, I'd cut this to a quarter and say the monsters suffer 25% casualties and the rest flee, while the fighters suffer 10% casualties (say, 4 level 1 and 1 level 3) and many wounded.
If the monsters had some truly brilliant tactics that effectively sprang a trap on the fighters, I would double their power so the conflict becomes 159 against 150. Their power is balanced. In this case I'd rule a fierce and balanced battle with 25% (or even 50% for a pyrrhic battle) casualties on both sides, and have both sides retreating. If a mutual retreat did not make sense, I'd be inclined to have the humans retreating after being so surprised, but could go with the monster's retreat if such a retreat was more easy tactically (as the humans still do have a slight advantage in power).