How to store lots of entity positions in an indexed manner?

I have lots of frames of my "animation" (simply a player following a path).

I've made a fabric mod to collect all positions

104.3081, 135.5000, 18.6673, 4.6104, -484.4122
104.3661, 135.5000, 18.6403, 4.8039, -488.6956
104.3978, 135.5000, 18.6256, 4.9420, -492.7303
104.4673, 135.5000, 18.5178, 6.2132, -519.2324
104.5165, 135.5000, 18.3746, 6.2132, -522.0236
104.5678, 135.5000, 18.2015, 6.2409, -525.5884
104.6151, 135.5000, 18.0109, 6.3514, -528.6559
104.6555, 135.5000, 17.8099, 6.6001, -531.4193
... (5500 more)

I was about to make a python script that uses thousands of if statements, but that would probably not be a good idea

I'd need to have a frame variable, that I can increment if the condition matches.

Continue to help post