Transform Long[] and Integer[] to long[] and int[] in utilities