Can large airliners do aerobatics such as loops?
Design

The key point is that these vehicles are not designed to perform such maneuvers. 

A coast-guard lifeboat is designed to self-recover from a capsize and can roll through 360 degrees without significant structural damage. A cruise-liner would not survive being rolled over completely. 

If a vehicle is not designed to perform a high stress maneuver it is safe to assume an unmodified vehicle cannot do so without incurring severe damage.

Inside loop

Regarding an inside loop, the world's smartest man says


  Looping a 747 or a DC-10 would be trickier [than rolling one ...]  Boeing suspects its planes could make it, but since no one has ever been silly enough to try, there's no way of knowing for sure.


Outside loop

An outside loop is much much more stressful on airframe and pilots as it involves negative G. Airliners have flight envelopes that have much less capability under negative G. There must be a very high probability the aircraft would break up when attempting an outside loop.

Roll

A barrel roll is a less stressful maneuver.

60 years ago, in 1955, "Tex" Johnston, a Boeing test pilot performed a barrel roll in a Boeing 707. So far as I can find out, no one has since deliberately attempted to replicate this stunt in a commercial airliner. At the time of publishing his autobiography, the pilot claimed in a newspaper report that the stunt was planned by him but unknown to his boss.

in 1985 China Airlines 006, a 747, inadvertently executed a half roll but suffered structural damage. It rolled to 60 degrees before the pilot disengaged the autopilot, the pilots suffered spatial disorientation and the roll continued into a dive. The pilots obviously weren't flying the aircraft within its limits - meaning you can't read a lot into this, other than it might be easy to break up the aircraft while attempting this sort of maneuver.