Array type inference