Use an array instead of a Vector for our buffer since it has to be converted to an arrays anyways for sorting