While trying to delete a few messages, I accidentally deleted all messages from a contact on my iPhone, but they're all still there on my iPad. For some reason, iCloud backup doesn't include the messages. Can I restore the deleted messages on the iPhone using my iPad? And how do I include messages in iCloud backup for the future?
The only way to get your messages back on your iPhone is to restore your iPhone from a backup that predates when you deleted the messages.
Right now there is no option to include messages in iCloud backups. Starting with iOS 11, however, there will be. In iOS 11 beta 1, there's an option in Settings to enable full chat archive synchronization in iCloud.