That way, it might still contain a lot of overhead depending on how the coordinates are organized. I would rather take all triples and tuples from the xyz and uv that have an index in indices, copy them into a new structure and adjust the indices accordingly. That way, only indexed geometry remains in the arrays.
The 731 is the max vertex count+1...calculated based on the calculated triangle count which itself it somehow based on the number of indices...i don't know the exact formula that i'm using ATM, but that's the idea.