Fix internal storage ordering on arrays