input: Write a function to optimize the given code to use built-in functions. The original function removes duplicates from an array using nested loops. The optimized function should achieve the same result using built-in functions. If the input array is empty, the function should return an empty array.
  
  def removeDuplicates(array):
      finalArray = list(set(array))
      return finalArray
  
  assert removeDuplicates([1, 2, 3, 2, 1, 5])==[1, 2, 3, 5]
  assert removeDuplicates([5, 5, 5, 5])==[5]
  assert removeDuplicates([1, 2, 3, 4, 5])==[1, 2, 3, 4, 5]
  assert removeDuplicates([])==[]
output: def removeDuplicates(array):
      finalArray = list(set(array))
      return finalArray