input: Write a python function to add a given number to each element in an array.
  assert add_to_array(3, [1, 2, 3]) == [4, 5, 6]
  assert add_to_array(5, [10, 20, 30]) == [15, 25, 35]
  assert add_to_array(-1, [0, 1, 2]) == [-1, 0, 1]
output: def add_to_array(num, arr):
      return [x + num for x in arr]