input: Write a function to optimize the provided Python code to remove duplicates from an array using built-in functions. The function should iterate through the array, appending each unique element to a new array, and return this new array. The original array should not be modified.
  
  def removeDuplicates(array): 
      return list(set(array))
  
  assert removeDuplicates([1, 2, 2, 3, 4, 4])==[1, 2, 3, 4]
  assert removeDuplicates([5, 5, 5, 5])==[5]
  assert removeDuplicates([1, 2, 3, 4])==[1, 2, 3, 4]
  assert removeDuplicates([])==[]
output: def removeDuplicates(array): 
      return list(dict.fromkeys(array))