Array instead of map

Hi

I have some code to control a micro stepper motor when the voltage at the analog pin changes.

The code works but not as accurate as I would like so want to change the map function for an array.

This is my map code

int target = map(vin, 531, 840, 0, 180);
target = constrain(target, 0, 180);

Can You show that code and tell a lot more about the accurazy wanted and the accurazy You have?

"micro stepper motor" and "0-180" doesn't make sense. "0-180" relates to a servo motor, so what is it.
Using an array for that also doesn't make sense. Please explain.

531-840 is only 310 values, so why that small range. What voltage.
Converting (downscaling) that to 0-180 (181 values) with map should be ok, and that resolution is more than enough for a hobby servo.
If you want to use that full voltage range, then write to the servo with writeMicroseconds().

Unless your analog value is non-linear, there is nothing to be gained with a 310 element array.