input: Write a function to find the most common elements in an array of integers. The function should return a list of the most common elements. If the array is empty, the function should return an empty list.
  
  def most_common(nums):
      if not nums:
          return []
      counts = {}
      for num in nums:
          counts[num] = counts.get(num, 0) + 1
      max_count = max(counts.values())
      return [num for num, count in counts.items() if count == max_count]
  
  assert most_common([3, 4, 1, 2, 5, 3, 3])==[3]
  assert most_common([4, 4, 4, 2, 2])==[4]
  assert most_common([1, 2, 3, 1, 2, 3])==[1, 2, 3]
  assert most_common([])==[]
output: def most_common(nums):
      if not nums:
          return []
      counts = {}
      for num in nums:
          counts[num] = counts.get(num, 0) + 1
      max_count = max(counts.values())
      return [num for num, count in counts.items() if count == max_count]