Where is the Mac password requested by iOS stored?
With public key cryptography, It's not necessary to store any password on a technical level.

Apple could implement a “use once locally and securely destroy immediately” algorithm as part of key procurement (to decrypt keys used for encrypting data marked as 'secure' on iCloud such as Health, where the keys are based in part on device password) to derive cryptographic keys have been generated based on your current device passcode, apple keys, or other factors.