[DOC] Various improvements to API dox.

The input of Segment/ModifiedString/Index etc. are fixed-size containers. There is no need to resize them