support creating int and double arrays