I’m guessing this isn’t exactly what you’re talking about, but it might give you some ideas:
flowerArray = [45, 135, 225, 315];
boxArray = [0, 90, 0, 90];
startFrame = 50;
endFrame = 100;
t1 = framesToTime(startFrame);
t2 = framesToTime(endFrame);
linear(time,t1,t2,flowerArray[index-1],boxArray[index-1]);