Basically all of the history of science until 200 years ago was figuring out "mine and extract" and the course of civilization is very much linked with the price & quality of metal structures they could produce. But it's gotten so good we take it for granted.
However that is because of gigantic plants situated in specific areas where energy is cheap that do this thing at an amazing scale.
Aluminum is cheap as chips, except that it used to be more expensive than platinum (and at a much higher impurity ratio than the stuff we use for baking or for making cheap cases).
Heck, gold is "a thing" because we could purify and mold it without bringing it to a melting point and it was, for a very long time, the only metal available to us to do anything with, way before the bronze age.
And the problem with the refinement process is that you can't really "be smart" about it, reaching very high temperatures is one of those things you can't really scale down in an efficient way. You'd have to propel 100,000 tons of factory to mars in order to efficiently refine anything remotely close to the metals we had access to 100 years ago.
Which is not to touch on the mining bit, that is in itself very complicated (see how slowly and shallowly rovers are currently able to drill).
Are there workarounds for this? Maybe, I don't think anyone knows them though, they are not the kind of thing that's within easy reach. Maybe if we happen to stumble upon large reserves of bismuth or lead or gallium or mercury close to the surface of Mars, and build a whole branch of engineering around using those to build machinery... ? But my limited knowledge of geophysics and geology tells me that finding those in large amounts is very unlikely.
For reference, if you take an oven, that can reach, say, 450 degrees celsius (home) and up to 700 (industrial). Those aren't enough to refine any "useful" metal (e.g. iron) and building them requires materials that were produced at 1500+ degrees.
IANAChemist/IANAMaterialScientist/IANABlacksmith though, so take with a spoon of salt.
In the limit, If something takes 5,000 watts, you could run it for a few minutes/day, with that same RTG, provided you had suitable energy storage.
Perhaps they could gather grains of material, and just sort them, one at a time, only keeping the iron rich material, or use a permanent magnet to gather ferrous material. You could sinter the grains together using a microwave or laser pulse.
The results don't need great quality, just enough tensile and compressive strength to be mechanically stable during additive or subtractive manufacture.
Lots of minds have been thinking about refining metals for a very long time, but they haven't been thinking about doing it on Mars, with limited power, and very far outside the box of normal constraints, like cost.
This is one time capitalism doesn't apply at all... and most solutions assume capitalist incentives and costs, instead of going back to first principles thinking.
But thinking about it now, I can't envision that we here would be able to come up with something sublime/novel that a huge army of really-smart people haven't already after spending decades thinking about it. Then again, we have a lot of smart people concentrated in this forum, so who knows if a weird/silly conversation triggered by IT-minded people, acts as a catalyst for the engineer-lurkers that see it.
And then you land your digger, at a cost of at least a couple 100 million, and you have a dumb robot that digs a small hole?
We should do industrial build up, but for me that starts with solving cheap transportation from earth to Mars first. Then you can hope to bring things like nuclear reactors, that can actually produce the power you need significant work.
Currently we are going for science reason and very few people are even working on going with humans or industrialisation.