You mean that you want to vary something in a List/Tree of things (by index) and then use another index?
If so that’s very easy via code: after a change you store your newly modified List/Tree in a paramemer (kinda “internalizing” on the fly the List/Tree) and then you read the List/Tree FROM the parameter BEFORE changing any value in the index slider (or trigger any re-execution) : so each time that a change occurs you use that sort of "“external” loop in order ro memorize the previous change(s)…
In real-life is slightly more complex than that … since requirements raise about storing variants (history) and recalling them at will (or delete something) etc etc … but the concept is the same. Here’s an "“interface” (spot the options available for the working/current collection plus the ones related with the variants) for some similar task:
For instance imagine a Mesh with 500 faces. Say that you want to access a face by index, do something (move it along normal [and redo the mesh] or do another thing) and then access another face etc etc.
Notify if you want a C# demo.