Returning some iterator type instead of the whole `Vec` directly would allow consumers to have more control over how memory is allocated.