Dear Sab,
I could find out the following addressing your questions:
1. That a refugee in spite of getting residence permit cannot go back to his/her homeland.
--> This depends on the reason you were/are granted refugee status:
In the case that you have seeked asylum, due to political problems in your home country with state, you will not be allowed to travel in your home country as long as this government is in place. But once you get the German Passport you can travel as a German Citizen there.
2. Exactly when can a refugee go back to his/her homeland?
This depends on the reason why someone is granted refugee status, and in most cases in the refugee travel documents it stats whether you are allowed to travel in your homeland or not(--> indicates only if not allowed)
3. And in general how many years does it take to receive that status for a duldung holder?
In the usual cases it takes upto 6 years, but again this are just estamations and the Ausländeramt/Ausländerbehörde will check each case on its individual facts and decide then.
https://***.anwalt.org/asylrecht-migrationsrecht/fluechtlingsstatus/
4. Doesn't a refugee ever receive the status to travel around the world including homeland?
She/he does but it takes time and depends on the type os status you were/are granted. In all cases I would suggest to consult the Sachbearbeiter*in in the Ausländerbehörde/Ausländeramt on this question.
Best regards,
Nilab