input: Write a function to generate all combinations of a given array and a specified length using itertools.
  assert generate_combinations([1, 2, 3], 2) == [(1, 2), (1, 3), (2, 3)]
  assert generate_combinations([4, 5, 6], 1) == [(4,), (5,), (6,)]
  assert generate_combinations([7, 8, 9, 10], 3) == [(7, 8, 9), (7, 8, 10), (7, 9, 10), (8, 9, 10)]
output: def generate_combinations(arr, length):
      from itertools import combinations
      return list(combinations(arr, length))