Getting an array of values to update at a fixed time step independent of the frame time

I’ve been messing about with setTimeout() trying to figure out a way to get an array of values to update (I’m storing a BABYLON.Vector3 in each position) at timesteps independent of frame time. I wish to control the motion of objects (each of which will be doing things) using random number generation, updating velocities with each frame by adding incremental acceleration, which would be informed by this array. This should run indefinitely, so I do not see a good way to incorporate that into the system of animations and keyframes.

How could I set up an array to update with definite periodicity without end?

either setInterval(…) or in the renderLoop by summing deltaTime to be sure enough time has ellapsed since the previous tick.

When you say renderLoop, just for clarification, do you mean including the operations within something like scene.registerBeforeRender(()=>{put stuff here});?