Efficient algorithm for generating Pauli coordinates for an arbitrary linear operator