AC regime: Serial connection of ideal current generator and impedance and Parallel connection of ideal voltage source and impedance
In both cases, with the positions of Z in each scenario, neither the output current nor the output voltage is affected by the presense of that impedance Z. If you are tasked with finding the power dissipated by Z then treat that as a seperate circuit; you know the current or the voltage so you can calculate power.