All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Infringing on others' property by taking it from them by force or theft is absolutely forbidden. Whoever does so should seek the forgiveness of Allaah and sincerely turn to Him in repentance. Sincere repentance includes returning what rightfully belongs to its owners or seeking pardon from them. A Hadeeth reads: “The hand is liable for what it has taken until it gives it back.” [Ahmad and At-Tirmithi]
If a person has stolen from a bank, he must return the money to the bank, even if indirectly, in a way that does not cause him harm. By doing so, the thief becomes absolved of sin, and he should not give it in charity if he is able to give it back to its owners. For more benefit, please refer to Fatwa 92133.
As regards the excuse that the money could belong to those who have deposited the money in the bank, and other excuses that you have mentioned in the question, the thief is deceiving himself by this into not having to return the property to the rightful owners. He must return the money to the bank, because the money belongs to it, and the bank is responsible and liable for the money.
Allaah Knows best.