input: Write a function to filter an array by a given criteria. The function should take two parameters: an array and a criteria function. The criteria function will be a function that returns True if an element of the array satisfies the criteria and False otherwise. The function should return a new array containing only the elements that satisfy the given criteria.
  assert filter_array([1, 2, 5, 10, 15, 20, 25, 30], lambda x: x % 5 == 0)==[5, 10, 15, 20, 25, 30]
  assert filter_array([1, 2, 3, 4, 5, 6], lambda x: x % 2 == 0)==[2, 4, 6]
  assert filter_array([11, 12, 13, 14, 15], lambda x: x > 12)==[13, 14, 15]
  assert filter_array([], lambda x: x == 0)==[]
output: def filter_array(arr, criteria):
      return [x for x in arr if criteria(x)]