Is it impossible to do "select where nonzero"

Say I have a sparse input Tensor and I just want to select the nonzero elements and create a Tensor of JUST them. Is that possible? I have looked at every op and none seem to work. nonzero just gives a mask but you can’t gather only those elements.

e.g.

x: [0, 0, 0, 1, 5, 0, 0, 1, 19] output: [1, 5, 1, 19]