Impact of active galactic nuclei feedback on the dynamics of gas: a review across diverse environments