input: Write a python function to filter an array by a given criteria using a lambda function.
  assert filter_array([1, 5, 10, 15, 20, 25, 30, 35], lambda x: x % 5 == 0) == [5, 10, 15, 20, 25, 30]
  assert filter_array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], lambda x: x > 5) == [6, 7, 8, 9, 10]
  assert filter_array([2, 3, 5, 7, 8, 13, 17], lambda x: x < 10) == [2, 3, 5, 7, 8]
output: def filter_array(arr, criteria):
      return list(filter(criteria, arr))