It might make a bit more sense to just use hashkeys with in the second array.. i.e.
$array1[0]{username}=$username etc. Also note that your pushing a refference to an array
This is pointing to @array1 specifically, if you just wanted an annonymous array, then drop the backslash, and (if you need to) surround it with parens.