I'm not sure I understand your problem, since finding the smallest value while exluding values above a given threshold, will return the same value as just finding the minimum of the array. Could you describe your problem a little more?