You can use a for-loop, or a for-each-loop, or maybe you can map through given data, replacing each item’s ID, or what ever you want.
In the same time you also could use the same loop, to create separated data, generating/populating new ARRAYs.
let myNewDataArray = []
This one inside loop…
myNewDataAreay.push(…)