input: Write a function to filter an array by a given criteria. If a value in the array matches the criteria, it should be included in the filtered array. If the criteria is not met, the value should not be included in the filtered array. The function should return the filtered array.
  
  def filter_array(array, criteria):
      filtered_array = []
      for value in array:
          if criteria(value):
              filtered_array.append(value)
      return filtered_array
  
  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([3, 7, 9, 11], lambda x: x % 2 == 0) == []
  assert filter_array([], lambda x: x > 0) == []
  assert filter_array([100, 200, 300], lambda x: x >= 200) == [200, 300]
  assert filter_array([-5, -1, 0, 5], lambda x: x < 0) == [-5, -1]
output: def filter_array(array, criteria):
      filtered_array = []
      for value in array:
          if criteria(value):
              filtered_array.append(value)
      return filtered_array