A general method for the immobilization of cells with preserved viability