I think there’s some confusion here. There’s no matrix and corresponding preconditioner. The latter are usually derived mechanically on the fly as the iterative scheme evolves unless you already have the matrix inverse, which would be the perfect preconditioner as you’d just apply the inverse and the iterative method would converge on its first step. The matrix may also be created from, say, timestep to timestep, and change as the code evolves. So, it may never be stored in a complete form either, just computed as needed.
In lots of methods where we have a step showing that we need the inverse of a matrix applied to an object, we often do not have the matrix fully formed, and so will never fully form it nor its inverse. We simply need to perform their actions on arbitrary vectors. As a result, the preconditioner will probably never be fully constructed in most production programs since, for big problems, the pieces of your matrix are scattered all over the memory of a large parallel computer.
But don’t despair, there are libraries, as mentioned in other answers and comments that handle these issues, so you “just” have to adapt your code to their manner of representing matrices and vectors.