Added array type handling