Polariton crystallization in driven arrays of lossy nonlinear resonators