input: Write a function to return an array containing the smallest and greatest values from a given array. If the input array is empty, return an empty array.
  
  def min_max_values(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]
  
  assert min_max_values([3, 4, 2, 8, 15, 6]) == [2, 15]
  assert min_max_values([1]) == [1, 1]
  assert min_max_values([]) == []
  assert min_max_values([-1, -2, -3, -4, 0]) == [-4, 0]
  assert min_max_values([9, 9, 9, 9]) == [9, 9]
output: def min_max_values(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]