smallest_n_indices function

Returns the indices of the n smallest elements in a vector