that's what the model 3 does. it induces resistance in the motor at 0 rpm to generate heat which is then transferred to the coolant loop to heat the battery.
but in order to warm up the very large battery pack, on a cold morning you need to turn the car on (well) before you start driving to have it warm enough for full regen.