The title of this thread is something that you cannot do, so I'm not surprised you're having trouble.
Given we can't help you to do the impossible, your solution is to use an actual array, as you...