The Hobbit is a fantasy movie, and it shows. Medieval armies were much smaller than that (armies started getting bigger after the 15th century) and most men were levies armed with whatever they were give. Or could find. Formations were also not very prevalent, but most early medieval battles were fought in the shield wall, bassically a deep, long row of men with their shields protecting them and the man next to them.
Most armies were not often more than a few hundred men strong (for most counties, duchies etc.)