SET EVAL ~array_%i%~ = i // !!! Does not work. Use $array(index) notation instead. !!!
The reason it does not work is that while $array(x y z) is syntactical sugar for array_x_y_z, it also registers the variable as being part of the array as a side-effect. If you define array_x_y_z with normal assignment, you can retrieve its value with $array(x y z), but the variable is not considered to be part of the array, which means it's also not considered when PHP_EACH does its thing, and possibly in other situations.