input: Write a function to generate an array of random numbers between two specified values. Use these provided minimum and maximum values for the array. If the specified values are empty, return an empty array.
  assert generate_array(0, 50) is not None
  assert generate_array(0, 0) == []
  assert generate_array(5, 10) is not None
  assert generate_array(-10, 10) is not None
  assert generate_array(None, None) == []
output: import random
  
  def generate_array(min_val, max_val):
      if min_val is None or max_val is None:
          return []
      return [random.randint(min_val, max_val) for _ in range(10)]