CarPlay does not appear to be an app built on top of another OS. It appears to actually be the OS of the infotainment system. To implement in Model S would require Tesla moving away from Linux or IOS 7.1 SDK to support an app model for CarPlay API's which I highly doubt. But I'm happy to be wrong.
If Apple would allow it, it could be done with virtualization…