smallestWhileGreater function

Checks a passed array for the smallest value still greater than a
passed-in value