input: Write a function to find the most common elements in an array of integers. This function should return a list of the elements that appear most frequently. If there are multiple elements with the same highest frequency, include all of them in the result. If the array is empty, return an empty list.
  assert most_common([3, 4, 1, 2, 5, 3, 3]) == [3]
  assert most_common([1, 2, 3, 3, 3, 4, 4, 4, 4]) == [3, 4]
  assert most_common([5, 6, 1, 6, 6, 2, 5, 5, 5]) == [5, 6]
  assert most_common([8]) == [8]
  assert most_common([]) == []
output: def most_common(arr):
      if not arr:
          return []
      freq = {}
      for num in arr:
          if num in freq:
              freq[num] += 1
          else:
              freq[num] = 1
      max_freq = max(freq.values())
      return [num for num, count in freq.items() if count == max_freq]