I didn't look at all the Bank related addons but this one does something similar by the sounds of it.
https://www.wowinterface.com/downloa...Snapshots.html
Might be worth searching through the other Bank addons and seeing if any are close enough to use or look at to write your own.