infer array type