Collective effects in the dynamics of driven atoms in a high-Q resonator