It may be not possible but I have a theory.
LM2596-ADJ ICs have a voltage divider on the output to get the desired output voltage. What if PWM pin of arduino is connected (galvanically separated by opto-isolator or something else) and changing the duty cycle initially by POT (for testing) and then via code and in effect changing the voltage at the divider and thus at the feedback pin.
I may be way out but it’s just a theory, experienced members can comment and guide more on this.
What I am not sure about is what is the range of the voltage at the feedback pin and can we map the same on the arduino with reference to the duty cycle (0% is min Volt of reference pin and 100% is max V of ref pin)?