Im not sure if the Scripting-forum is really the best place for the question.
Could You link to an example of what You mean exactly?
Anyway if one makes the whole of the background (however many layers that are) into a Smart Object one can create a Displacement Map for use with Filter Distort Displace and apply that to either the original SO or a copy thereof (possibly masked or Clipping Masked to a foreground object) and on editing the SO the displacement will be applied to the result.
The thing to keep in mind is that Displacement Maps can work with two channels to affect the horizontal and vertical offset separately and that black and white in a channel mean positive and negative offset.
Which means that is possibly for example to create an approximation of a lens-effect by creating an rgb-file of a circle with a 50%-grey center and 12-, 3-, 6-, 9-oclock-points (so to speak) measuring at 128/255/128, 0/128/128, 128/0/128, 255/128/128.
Reflections and shadows could be achieved with Layer Styles or Adjustment Layers
All in all the method is not that easy, but it might come close to what I think You had in Mind.
Edit:
Maybe You could check this out: http://www.gurusnetwork.com/tutorial/displace/
... View more