RE: Existing contacts in Dyamics Portal the email is already taken dynamics 365
In our of my engagements we did a similar process. As users were imported into the system from a legacy system, and passwords were not, we had a process that would automatically send them an invitation if the email address was found in the system and ask them to enter an invitation id that we would sent them and then reset their password.
Since the registration form is not something that you can modify, we created our own registration form where we would run the logic, and embedded the system registration form into it as a hidden iframe. If the user actually needed to register we would pass the parameters from the parent form to the iframe and execute the click button (using jquery).
If you are not too comfortable with scripting this might be slightly complex, but definitely achievable.
You can always develop your own logic without the iframe and on the internal side (CRM side), call the plugins that reset the password and update the contact entity fields as needed. You would have to do some investigation for that yourself.
There are probably other options that other community members did to achieve similar functionality.
Hope this helps.