I assume you already know how to find the peaks. If so, the logic for identifying the first one is straightforward:
isPeak = // Your logic here
countPeaks = Cum(isPeak);
firstPeakBar = ValueWhen(countPeaks == 1, BarIndex());
If you did not in fact want to look at the ENTIRE array (which would typically be the case), you could use SumSince() instead of Cum() to start the counting from some other event, for example the first bar that's in range.