The new technology could one day have applications in cars, energy grids, and other places batteries are needed