input: Write a function to optimize the given Python code to use built-in functions for removing duplicates from an array.
  
  ### Input:
  def removeDuplicates(array): 
      for i in range (len(array)): 
          for j in range (i + 1, len(array)): 
              if array[i] == array[j]: 
                  array.pop(j)
                  
  ### Output:
  def removeDuplicates(array): 
      return list(dict.fromkeys(array))
  
  assert removeDuplicates([1, 2, 2, 3, 4, 4, 5]) == [1, 2, 3, 4, 5]
  assert removeDuplicates([5, 5, 5, 5, 5]) == [5]
  assert removeDuplicates([]) == []
  assert removeDuplicates([1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == [1, 2, 3, 4, 5]
  assert removeDuplicates([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]
output: def removeDuplicates(array): 
      return list(dict.fromkeys(array))