All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
You have done well by repenting to Allah from taking people's money without right, so may Allah reward you.
We ask Allah to preserve you in the future in your religion and your worldly affairs.
We have already explained the conditions of repentance in Fatwa 86527, so please refer to it.
For the repentance to be complete with regard to the financial rights of the people, you have to give the rights back to them whenever possible as stated by the scholars.
Therefore, you have to strive to give the rights back to your friends if they are still alive or to their heirs if they have died, and it is not a condition to inform them about what you did.
If it is possible to give the money back to any of your friends, or to her heirs, then you are not acquitted from sin except by doing so, and it is not sufficient to give it in charity unless you are unable to find her place or to deliver the money back to her.
If you gave the money in charity while intending the reward to one of your friends, and then she appears, then you give her the choice either she accepts the act of charity on her behalf, or you give the money back to her and the reward of the charity will be counted for you.
If you forgot the exact amount of money that you had taken from your friends, then you should endeavor to estimate it and give an amount by which you think that you are acquitted from sin by donating it.
If you donate the amount in charity, then you may donate it in any charity field, like what you mentioned, such as putting it in an orphanage charity box, if the people who run it are trustworthy, otherwise do not give it to them.
It is also permissible to donate it to the mosque. However, if what you had donated to the mosque was done as a general donation, then it is not permissible, after having donating it, to consider it to be in return of the money of the people. ‘Umar ibn Al-Khattaab narrated that the Prophet said: "Actions are (judged) by intentions." [Al-Bukhaari and Muslim]
Since you had donated the amount to the mosque with the intention of a general donation, then you cannot consider it as a donation on behalf of those whom you have transgressed their rights.
Allah knows best.