I believe the answer is yes to both. However, I do not use Time Machine, so I can't tell you how t get it there. Time Machine is primarily for backing up, so getting the password may be difficult. You can more easily get it from Keychain. However, from what I've read here, it may not have been transferred. What you need to do is to ensure that your computer is connected to your iCloud account and that Keychain is selected for mirroring. To do that open System Preferences. Click on Apple ID. Click on iCloud on the left side of the window. Then make sure that Keychain is clicked. When we do that it means that Keychain and the Mac will mirror each other.
In addition, I recommend that everyone also separately store their passwords. I have done so on an Excel spreadsheet. I keep it up to date and current. I also made the document itself password protected. If you aren't sure that you will remember it for sure, then write it down somewhere secure. I then keep a printed copy for quick reference when needed since not all of my passwords are stored on Keychain for security concerns.
In the worst case scenario, just create a new password for that account and then save it.