How do I configure Time Machine to backup my Macs to iCloud? I have the 2 TB iCloud storage plan and back up my iPhones and iPads there. How do I configure Time Machine to do the same with my MacBook Pro's and Mac Mini's?
You cannot officially back up a Mac to iCloud at this time.

If you want to write a program that does this, you could utilize CloudKit. This would be beyond the scope of a single Stack Overflow question, so I'll just link to the CloudKit documentation here:

https://developer.apple.com/icloud/cloudkit/