The thing is that games such as D&D amplify the difference in power level between humans far more than is possible in real life.
D&D Mechanics
A high level warrior can survive hundreds of blows from lower level attackers, and with his armour and other defenses only 5% of those blows will even hit (using the automatic hit on a 20).
If you factor in damage reduction then that can become even more drastic, even 5 points of Damage Reduction is enough to mean that your average low level combatant is barely able to scratch their target.
In the meantime your wizard does have a limited spell selection but those spells include being able to strike an area with swarms of meteors, hem people in with force-fields, turn vast areas of rock into mud, enlarge the fighter to make him stronger and tougher, etc.
Unfortunately the question doesn't specify the size of an army. So lets look at some numbers. A large medieval European army would have 5,000 to 10,000 people in it. So lets say there are 6,000 soldiers and you need to wipe out 3,000 to make the survivors flee into the desert (where they will probably die anyway).
If you are going to say that the battle lasts an hour, then that means each of the 6 heroes needs to kill 500 in that hour, or 8 per minute. In D&D rounds of 6 seconds each that is just under 1 kill per round. Assuming the fighter has a 5% chance to miss (a roll of 1 on a d20 always misses) and only kills one target per round then that is still enough. In practice he would have the ability to strike multiple targets per round so would chew through them considerably faster than this.
In fact these numbers are easily sustainable, assuming the average army member is low enough in levels then even once they ran out of spells the wizard would probably be able to able to take down one opponent each round just by hitting them with his staff. The warrior would be killing many more per round than that. I run a game at the moment where a level 6 warrior easily kills 2 or 3 low level targets each round.
So, mechanically in a role playing game it works (although it would be a boring session!). But how does it work in terms of a "reality-check"?
The Reality Check
D&D is a very simplified model of the world. There are a number of things it just does not consider that to do a proper job of world building we should consider.
Exhaustion
The first problem is exhaustion. Fighting, especially in heavy armour or throwing high-powered magic around is tiring. In a Live-Roleplaying System I help run we do big battles (1000+ people on each side) as a part of the event. One thing we have learned though is to make sure that the actual battle itself lasts for an hour at longest.
Once the hour is reached people start becoming tired and making mistakes and our number of Out-Of-Character injuries sky-rockets. We get more injuries in 1:00 to 1:15 than in the entire previous hour.
So the six would need incredible stamina. The ability to keep up sustained life-on-the-line adrenaline-fueled combat for an hour with no let-up, no pause, and no breather.
Missiles
The second problem would be ranged weapons such as arrows, crossbow bolts, even slings or just thrown rocks.
In melee combat only a few people can attack you at any one time. Even with pole arm formations or surrounding someone only a limited number can strike. With missile weapons though you could have a thousand arrows being fired at you volley after volley until finally one strikes a vital point.
The target would need to be essentially immune to missile weapons, either through "kung-fu style" dodging and parrying, through impregnable armour, or through defensive magic. Even a slight chink in these defenses would eventually be hit, so they need complete immunity.
Terrain could be used to mitigate this but in order to attack the army they would need to advance on it, so at some point would be vulnerable to arrow fire.
Fire, Magic, etc
Fire is a common weapon, even if someone is immune to weapons you can set them on fire and cook them in their fancy armour. You would need to be immune to heat, and have no need for external oxygen for protracted periods of time to walk through the fire unscathed.
Additionally in any fantasy army you should expect at least some magic. The enemy heroes would come against you as would enemy spellcasters, etc. These high-priority foes would need to be identified and dealt with first since otherwise they might be able to take you down while the army distracted you.
Conclusion
You will notice that I mostly focused on defenses, that's because the enemy have weak defenses of their own so your capability to kill them is not in question. You just need to survive long enough to do so.
Of course if you can kill them faster than this or if their army is smaller then you do not need your defenses to last for as long.
I've also shown that mechanically in D&D and conceptually in a fantasy world it is indeed possible for 6 people to defeat an army. The reason this is not possible in real life is because it is just not possible for 6 people to become as invulnerable as is required. Even in real life though you should expect a team of 6 trained and equipped modern soldiers to be able to handle a much larger horde of people with inferior equipment.
In real life it is the offensive power (automatic weaponry vs bows and arrows) that has changed while the defensive power has not improved by anything like the same margin. In most fantasy worlds both offensive and defensive power increases with levels, so that changes the outcomes drastically.
The thing to remember about high level fantasy characters is that they are almost godlike. These are people who can wrestle a dragon, swim across burning lava, smash the stone wall of a castle to rubble, etc, etc. If conceptually you can believe a Dragon defeating an army then it shouldn't be too much of a stretch to think of a Dragonslayer also being able to defeat one.