remove repeating int values from an array