You want to create something like the magsafe 2 powerbank?
That would not be very helpful for laptops, as they have a much higher rate of discharge and need way more power than something as small as magsafe could deliver.
If you are looking for a cable, someone has already done this.