but actually find the lowest value is just one iteration through the array - the ways above are extra:
if you need custom number of lowest id the you need another array where you can store indexes of main array and return it
i offer organize that micro search within new array that should be auto sorted by you