AnalogRead peak detection (local maxima)

That's what arrays are for. There is a tutorial http://arduino.cc/en/Tutorial/Array