array extremum function added which search for min and max value in
array