I don't know where to start. Your code is lacking the step sequence and SPI writes.
Again, stick with the goPos() function I wrote (see it as a library).
I also don't see you write random/new positions to all 41 motors.
Writing to EEPROM every loop is also not possible.
It's slow (affecting motor movements), and you will wear out the chip very fast.
Maybe you should look at battery power for the setup (no EEPROM writes in loop).
Current draw is very low (only the Arduino) after the motors have reached their destination,
because the goPos() function also sleeps the motors.
You could still write to EEPROM for a controlled shut down, with a button.
Please explain exactly what you want to do with the motors.
I can then try to advise you how to tackle the problem.
Leo.