does this make sense to anyone else

Here are two snippets of a function using random numbers to index a couple of arrays.

The following shows getting a random array index, then using that value to access an array element, from the looks of things both arrays should access element X, where X is a random number between 0…length exclusive.

What actually happens is each GET operation is given a different random number. This seems somewhat counterintuitive to me. Am I right to think of variable wires as actually function calls on blocks in disguise, or are they meant to behave just like variables? The following does work

Int the first screenshot you will get 2 different values because RandomInt is called 2 time, then you need to cache the value in other variable like you did in the second one

Hello,
Nodes without exec input / output (the white ones) are not executed by themselves. They are executed only when are called by a node with an exec node. Which is why you have different results from same random as it is called twice. By setting variable, you define your random number and then use it when you need it as much as you need without having to deal with the exec.