How to store certain indices in point set or a matrix?

I want to extract certain indices of segmentation from each slice of the image and store it in a point set or a matrix(I’m not sure which one to use). Upon that, I would like to perform singular value decomposition.

How should I do this?

Note: I have already extracted the index values but how to store them all together?

This example how you can create a point set.

What are you trying to accomplish by SVD?