Your code doesn't quite do what you described. Would you like it to?
After taking 256 samples, then doing the processing, both LEDs will come on at the same time. Yes there was a higher peak and yes there was a lower one. That doesn't give you any indication of when that occurred.
Additionally, while you're in the sample-taking loop, the val2[] array never gets updated so the LEDs will switch on or off based on random numbers remaining in memory. For more randomness, you're addressing locations past the end of val2[], since i can go up to 255 and val2[] only has 100 elements.
Give your arrays meaningful names. inputSamples[] and outputHighPeaks[] or something like that. There's no penalty for longer names.