Variable variable names possible?

 

I am trying to create a system of storing values. The quantity of variables is unknown, based upon the money management rules I have devised. Basically, I need to have a value name that can be appended with a number, i, where i goes up by 1 when certain events take place. So can a variable name have an integer variable in it?

i=4

a1=5

a2=6

a3=7

a4=8

h=i

if.....then....i=i+1

ai=ah+1

the above scenario would check the if statement, and the result would be a new variable named a5=9. Then it would check again and if it was still true, it would create a new variable a6=10. (in know my context is all wrong, but I am just getting started and I wanted to see if this was possible before I get too far with the learning)

Does anyone have a good way of doing this?

Reason: