Do you mean, for example, {1,2,3,3,4,5,5,5,6,7,7} must result in {1,2,4,6}? That is, only those numbers that are not duplicated. Or must it result in {1,2,3,4,5,6,7}? That is, only one of each number, removing the duplicates.
A map would be a poor option for the stated objective. I am not saying you cannot use a pair of socks as pot holders, rather, that you should not. What are you mapping? Answer: nothing.
Given an array of int you can generate a unique list as follows: