remove duplicates from array without sorting