I have done that as a kid. The larger the current, the more the fun
I think a PWM control will be not the same as a smooth analog controlled current. It’s just my opinion, I think that pulses of high current is chemically not the same as a smooth analog current.
However, An analog current control will require big transistors and a very large heatsink.
Controlling the current is even harder.
It can be done with a shunt resistor as a feedback for an Arduino. And very big mosfets or transistors for a PWM control. It needs to be very big. To control 20A is no problem, but the PSU could supply much more current, a current limiter is almost impossible when the Arduino is used as control unit.
Perhaps a controlled switching regulator is the best option. I assume that something like that can be bought. Perhaps there are even devices like that with current control instead of voltage control.
Having a big PSU and controlling the current afterwards doesn’t seem the right solution.
For a test perhaps you can buy a used variac together with a 12V battery charger (a simple one, with only a transformer and rectifier diodes) could be used. Perhaps it will cost 100 or 200 dollars.
I have a very old welding power supply. Inside is a transformer and a moveable core to select the current. With 4 diodes of 250A it would supply a large current and the core can be used to control the current a little. Perhaps that is too big, you don’t want to boil the water :o
There are 12V 20A power supplies with current control for leds. Search Ebay for : 12v 20a led
My conclusion: It is not easy, buy something.