Remove the repeating int from array in a new array