  We report a theoretical study of a quantum optical model consisting of an
array of strongly nonlinear cavities incoherently pumped by an ensemble of
population-inverted two-level atoms. Projective methods are used to eliminate
the atomic dynamics and write a generalized master equation for the photonic
degrees of freedom only, where the frequency-dependence of gain introduces
non-Markovian features. In the simplest single cavity configuration, this
pumping scheme gives novel optical bistability effects and allows for the
selective generation of Fock states with a well-defined photon number. For many
cavities in a weakly non-Markovian limit, the non-equilibrium steady state
recovers a Grand-Canonical statistical ensemble at a temperature determined by
the effective atomic linewidth. For a two-cavity system in the strongly
nonlinear regime, signatures of a Mott state with one photon per cavity are
found.
