Casting arrays to objects.