What are some specific design elements of apollo 13 that allowed the astronauts to survive in space?
Actually they were very lucky. The Apollo capsule had very few changes to it with the last major one was explosive bolts on the hatch and less velcro as these were the contributing factors in Apollo 1 disaster. There have been times when human flyhing had to happen as opposed to computer flying. One of the mercury flights had to retain the retro rocket pack as the heat shield was loose. Armstrong had to manually land on the moon as they overshot their target. And the Apollo 13 astronauts did a lot of manual flying as they still had the lunar module attached. Not too many design changes as it was the ability of these test pilots to fly a machine.
After the Apollo 1 fire, NASA improved the capsule design to fix several wiring problems. The Apollo spacecraft got very cold and damp after the Command Module had been shut down and there was condensation all over the walls and the control panels. There was a concern that when the astronauts powered the CM back up for reentry, the condensation could cause some short circuits or sparks. Thanks to the redesign, this did not happen. To add to what D.k. said about a good ground crew, the astronauts themselves handled the accident very well also. They were military pilots, they’d been through plenty of simulated emergencies in training, and Jim Lovell was on his fourth spaceflight. All these factors helped them to keep their minds on the job and not panic, despite the seriousness of the situation.