Found this searching after I had the same idea. I follow forum guidelines.
Automotons, Mechanical Men, Automata.
There, other people can search this topic more easily.
Here is my spin on the idea, it wouldn't be terribly difficult to build a mechanical steam-punk army of killing devices, BUT you may not want to, think of all the horrible hilarious ways these things can go wrong.
As the two armies entered the field, Human McLeader could spot the smoke and fire breathing from the mechanical abominations created by the dwarves. Knowing he had no chance of victory he walked onto the field under the white flag of truce. The dwarven king and his enterouge approached.
"Surrender now and we may let you live as servents to live your lives cleaning the dragon cages." The King declared.
Meanwhile, behind the dwarven front line. Urist Borushdumat, the novice mechanic, tripped on a stray cat and fell on a lever.
The mindless mechanical army creaked into motion and began marching forward as the heated surrender negotiation continued.
"We insist on the retention of basic sock rights" yelled the McLeader.
"You will wear what you are told" shouted back the Dwarven King
"What's that behind you?"
"I'm not falling for that old trick"
"RUN!"
"AHHHHHHHH!"
I am trying to drive the point that in practice, a Mechanical Man shouldn't be very reliable unless it was made by a super legendary mechanic. Random explosions, mistaken identity, or just mindless literal interpretation of orders.
Also, the damage system for these things would be cool, black oil instead of blood and mechanisms flying off them when struck.