Dynamical polarizability of atoms in arbitrary light fields: general theory and application to cesium