Hypothetical: 1 Dragon vs 100 peasants (commoners)
First, the idea that dragons would not be unstoppable killing machines for NPCs was a design choice. I remember an article long ago talking about this, that cities should be able to defend themselves. If the cities couldn't dragons would rule the world which for most campaigns they do not.
But lets say you had a village threatened by a dragon. Present <whatever dragons want> or you die. So the villagers wait outside the village in a field slings at the ready and wait for the dragon. What happens next?
I'll use an adult red dragon because in 5e they don't have their fear aura. They do have an AC of 19, 256 HP. They also have above average human intelligence (16) and wisdom (13). In addition to their 30 foot cone breath they can also cast fireball once a day (range 120 feet) and scorching ray once per turn as a legendary action (range 120 feet).
In the other corner we have peasants +2 to attack, no damage bonus using slings (range 30/120), damage 1d4. They only have a 10% chance to hit, half of those hits if the attack is done within 30 feet so 2.5 damage for a regular hit, 5 for a crit, average for 3.25 damage on average per peasant with crits. It's .25 if the dragon has cover (see below). Long range is a bit iffy because they'll have disadvantage and I'm not sure how to calculate that so I'm just going to cut that down to 1.6 per peasant. I'll call it .05 if the dragon has cover and it's long distance (again, not sure how to calculate that).
Assuming completely empty field, no cover, all peasants 5 feet apart in a 10x10 grid. To benefit the commoners I'll assume they see the dragon coming and win initiative. I'm also going to do this as much as possible by strict rules interpretation, for example I'm not sure the back rows would even be able to hit the dragon if the dragon is on the ground simply because of all the people in the way.
Options
#1) Suicidal dragon
Continuously fly over the enemy giving them clear shots every single round.
Round 1:
Commoners: Because the dragon is cooperating with the commoners and always within 30 feet we get 325 damage. Yep, this is one suicidal dragon. There are old dragons, there are bold dragons, there are no old, bold dragons.