Where cluster metadata is stored?

I did some testing here. While ES was able recover "dangling" indexes and transient settings just fine, this is only one simple scenario that I have tested.