On my slider, I store the endpoints as a variable in the code. Technically the endpoint positions are stored in a JSON file that gets read and the variable is set according to the value stored in the file but you don't need the file, you can just hardcode the value directly in the code.
For each axis of the slider I store the "home" position and also the min/max position. For the linear slide axis, I store all three values as home = 0 steps, min = 0 steps, max = 100,000 steps. I don't use limit switches, in order to set the home position, I physically move the slider platform all the way to the left (or right depending on if I use inverted), then I call stepper.setCurrentPosition(home) or stepper.setCurrentPosition(0) in code to update the current position to be zero.
To go to the middle of the slider platform, I could do something like:
long middle = max/2;
stepper.moveTo(middle);
After calling moveTo for the stepper, obviously you would need to call the appropriate calls to actually start the stepper moving. I prefer creating my own loop and repeatedly calling stepper.run() to move the stepper to the position set by stepper.moveTo().