Scientists have developed water-repelling metal structures that will prevent ships from sinking even after damage.