Array: fix #579

Make sure we don't build an int[] for optional elements