Inserts the given value into the given array at a sorted location.
Value to insert
Array to insert into
Function to use when determining sort order.
Optional
Defaults to false; if true, the insertion is sorted in reverse order.
Inserts the given value into the given array at a sorted location.