input: Write a function to generate an array of random numbers between two specified values. The function should take two parameters, min and max, which define the range of the random numbers to be generated. If the input range is invalid (min > max), the function should return an empty array.
  assert generate_array(0, 50) != generate_array(0, 50)  # Random arrays should be different each time
  assert generate_array(50, 0) == []  # Invalid range should return an empty array
  assert all(0 <= num <= 50 for num in generate_array(0, 50))  # All numbers should be within the specified range
  assert min(generate_array(0, 50)) >= 0  # Minimum number should be at least the min value
  assert max(generate_array(0, 50)) <= 50  # Maximum number should be at most the max value
output: import random
  
  def generate_array(min, max):
      if min > max:
          return []
      return [random.randint(min, max) for _ in range(10)]