Partially finished new int[] function