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 represent the range of the random numbers. The function should return an array of random integers within the given range.
  assert generate_array(0, 50) != generate_array(0, 50)
  assert len(generate_array(5, 10)) == 5
  assert generate_array(0, 0) == [0]
  assert generate_array(20, 21) == [20, 21]
output: import random
  
  def generate_array(min, max):
      if min == max:
          return [min]
      return random.sample(range(min, max + 1), max - min + 1)