ID:271059
 
What I'd like to do is have a loop that does this:

for(var/I = 0; I < 10; I++)
var/mob/Item[I] = new/mob/XYZ //Creates a new variable named Item[I], where I is the current iteration number and assigns it to an new instance of XYZ
var/list/L
for(var/i=1 to 10) L+=new/mob/XYZ

var/mob/M=L[1] //this is the first mob
You can't have dynamic variable names.
Using a list, as Android Data posted, is probably as close as you can get.
In response to Android Data
It will fail because you didn't initialize the list.
Also, the var/i= part is useless, so just omit it.