We derive dynamical equations for a Josephson array coupled to a resonant cavity by applying the Heisenberg equations of motion to a model Hamiltonian described by us earlier [Phys. Rev. B 63, 144522 (2001); Phys. Rev. B 64, 179902 (E)]. By means of a canonical transformation, we also show that, in the absence of an applied current and dissipation, our model reduces to one described by Shnirman et al [Phys. Rev. Lett. 79, 2371(1997] for coupled qubits, and that it corresponds to a capacitive coupling between the array and the cavity mode. From extensive numerical solutions of the model in one dimension, we find that the array locks into a coherent, periodic state above a critical number of active junctions, that the current-voltage characteristics of the array have self-induced resonant steps (SIRS's), that when Na active junctions are synchronized on a SIRS, the energy emitted into the resonant cavity is quadratic in Na, and that when a fixed number of junctions is biased on a SIRS, the energy is linear in the input power. All these results are in agreement with recent experiments. By choosing the initial conditions carefully, we can drive the array into any of a variety of different integer SIRS's. We tentatively identify terms in the equations of motion which give rise to both the SIRS's and the coherence threshold. We also find higher-order integer SIRS's and fractional SIRS's in some simulations. We conclude that a resonant cavity can produce threshold behavior and SIRS's even in a one-dimensional array with appropriate experimental parameters, and that the experimental data, including the coherent emission, can be understood from classical equations of motion.