input: Write a function that filters an array based on a given criteria. The criteria function checks if a number is divisible by 5. If the array element satisfies the criteria, it should be included in the filtered list. If the array is empty, the function should return an empty list.
  
  def filter_array(array, criteria):
   filtered_array = []
   for value in array:
    if criteria(value):
     filtered_array.append(value)
   return filtered_array
  
  def criteria(x):
   return x % 5 == 0
  
  array = [1, 2, 5, 10, 15, 20, 25, 30]
  result = filter_array(array, criteria)
  assert result == [5, 10, 15, 20, 25, 30]
  
  array = []
  result = filter_array(array, criteria)
  assert result == []
output: def filter_array(array, criteria):
   filtered_array = []
   for value in array:
    if criteria(value):
     filtered_array.append(value)
   return filtered_array