pjburton:
I am trying to run this on an Arduino Nano. It may be that this code is simply too complicated to run on the Nano.
just for the fun I gave it a try to use arrays.
==> here is a version of what I think your code was doing. I think it's a bit shorter 
/*
Copyright (c) 2020 J-M-L https://forum.arduino.cc/index.php?action=profile;u=438300
Author : J-M-L
Create Time : May 2020
Change Log :
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
// define how the robot is built
const uint8_t nbJointsPerLeg = 3;
const uint8_t nbLegs = 4;
// and which pins control which servo
const uint8_t jointPins[nbLegs][nbJointsPerLeg] = {{7, 4, 2}, {8, 9, 10}, {14, 15, 16}, {11, 12, 13}};
// define specific positions by their joint angle
#define v1 {{112, 140, 0}, {109, 140, 20}, { 25, 120, 20}, {162, 140, 0}}
#define v2 {{112, 120, 20}, {109, 120, 20}, { 25, 120, 20}, {162, 120, 0}}
#define v3 {{112, 120, 20}, {109, 120, 20}, { 25, 145, 20}, {162, 120, 20}}
#define v4 {{112, 120, 20}, {109, 120, 20}, { 25, 180, 0}, {162, 120, 20}}
#define v5 {{112, 120, 20}, {109, 120, 20}, {100, 180, 0}, {162, 120, 20}}
#define v6 {{112, 120, 20}, {109, 120, 20}, {100, 160, 45}, {162, 120, 20}}
#define v7 {{112, 120, 20}, {109, 120, 20}, {100, 100, 45}, {162, 120, 20}}
#define v8 {{142, 100, 45}, {164, 120, 20}, { 70, 140, 20}, {107, 120, 20}}
#define v9 {{142, 170, 45}, {164, 120, 20}, { 70, 140, 20}, {107, 120, 170}}
#define v10 {{ 67, 170, 45}, {164, 120, 20}, { 70, 140, 20}, {107, 120, 20}}
#define v11 {{ 67, 120, 45}, {164, 120, 20}, { 70, 140, 20}, {107, 120, 20}}
#define down1 {{ 67, 140, 0}, {164, 140, 178}, { 70, 140, 0}, {107, 140, 0}}
#define down2 {{ 67, 140, 0}, {164, 140, 0}, { 70, 140, 0}, {107, 140, 0}}
// define the sequence you want to play
const uint8_t sequence[][nbLegs][nbJointsPerLeg] = {v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, down1, down2};
// *****************************
#include <Servo.h>
struct t_leg {
Servo joint[nbJointsPerLeg];
};
struct t_robot {
t_leg leg[nbLegs];
};
t_robot robot;
const uint8_t nbStepsInSequence = sizeof(sequence) / sizeof(sequence[0]);
void move(const uint8_t destinationPostion[nbLegs][nbJointsPerLeg])
{
int16_t maxChange = 0;
uint8_t startPostion[nbLegs][nbJointsPerLeg];
// calculate the largest move
for (uint8_t l = 0; l < nbLegs; l++) {
for (uint8_t j = 0; j < nbJointsPerLeg; j++) {
startPostion[l][j] = robot.leg[l].joint[j].read();
int16_t d = (int16_t) destinationPostion[l][j] - (int16_t) startPostion[l][j];
if (d < 0) d = -d;
if (d > maxChange) maxChange = d;
}
}
// if there is no move needed, just return
if (maxChange == 0) return;
// make small steps to reach the new position for each joint
for (int16_t aStep = 1; aStep <= maxChange; aStep++) {
for (uint8_t j = 0; j < nbJointsPerLeg; j++) {
for (uint8_t l = 0; l < nbLegs; l++) {
int16_t deltaMove = aStep * (((int16_t) destinationPostion[l][j]) - ((int16_t) startPostion[l][j])) / maxChange;
robot.leg[l].joint[j].write(((int16_t) startPostion[l][j]) + deltaMove);
}
}
}
}
void setup()
{
Serial.begin(115200);
// assign pins to the servos
for (uint8_t l = 0; l < nbLegs; l++)
for (uint8_t j = 0; j < nbJointsPerLeg; j++)
robot.leg[l].joint[j].attach(jointPins[l][j]);
}
void loop()
{
for (uint8_t s = 0; s < nbStepsInSequence; s++) {
move(sequence[s]);
delay(5);
}
}
of course totally untested but that could give you some ideas.