Fix array element type calculation.