local minima in an array