input: Write a function to optimize the provided Python code to use built-in functions for removing duplicates from an array. The function should return the array without any duplicate elements. If the given array is empty, the function should return an empty array.
  
  def removeDuplicates(array): 
      return list(dict.fromkeys(array))
      
  assert removeDuplicates([1, 2, 2, 3, 4, 4, 5])==[1, 2, 3, 4, 5]
  assert removeDuplicates([1, 1, 1, 1])==[1]
  assert removeDuplicates([])==[]
  assert removeDuplicates([5, 4, 3, 2, 1])==[5, 4, 3, 2, 1]
  assert removeDuplicates([5, 5, 4, 4, 3, 3, 2, 2, 1, 1])==[5, 4, 3, 2, 1]
output: def removeDuplicates(array): 
      return list(dict.fromkeys(array))