system
Given the following post, respond as if you're commenting on Reddit:
human
[general fantasy] what weapons (gunpowder and melee) would be good for dealing with armies of stone golems and animated armor?

Edit: added situation from comments for clarity:
Yes sure! 
I am working on a comic, in which there is an elven city/stronghold, and humans are trying to destroy said city.  Instead of fighting them self, the elves  use magic to control golems and animated armor to fight for them, and defend their city. The humans have dug trenches all around the city and cannons along with other firearms and explosives. There are thousands of stone golems outside of the city walls, that march in formations of hundreds toward the trenches. As for intelligence, each one is "programmed" with very little intelligence (enough to walk and fight, but not to come up with strategies or anything advanced) but as a group are controlled from the elves from afar, as if the elves are playing a very complex game of chess. The animated pieces or armor are not quite so numerous, and there are only hundreds, as a sort of special units. They would only be in groups of 3 tops, and are used to quickly take out many lives and reak havoc. They are much faster, more skilled, and programmed with lots of fighting experience and intelligence. **so the question being, if you were the humans with this knowledge in advance, what weapons would you bring/ what would be effective in such a situation?** (muskets, grape shot cannon fire, heated cannon fire, explosive rounds, blunderbusses, etc.)
gpt
Hmm, you've mentioned gunpowder and melee, are you asking for mundane methods of killing golems and enchanted armour or *specifically* methods involving gunpowder and melee? 

If it's general mundane methods corrosion works a charm against most minerals and metals – the trouble is the most exciting acids you could throw at them, like hydrofluoric acid, couldnt even be kept in glass bottles as they eat through it, but weaker ones like sulphuric/hydrochloric and in particular nitric acid will do wonders too.

I single out nitric as it's one of the earliest sources of high explosives, so if you're not using it to corrode metal and rock monsters you could use it to make explosives out of common plant fibres and a little chemical know-how (dont want to go into too much detail on explosive manufacturing though...)

Otherwise if you're asking about techniques involving guns and swords, could you provide any tactical details on the golems and enchanted armour? Like how intelligent are they? How fast do they move? Do they travel in groups? Pairs? Solo? How big are they?