return an array that removing duplicate elements of the given array, still keep the order of the elements.