If we want to add support for making std::cin and std::cout optional, it is impractical to have all of the mbstate_t objects in one array. This would mean that if std::cin and std::cout are omitted, the state_types array is only used partially.
Solve this by using separate global variables. These are placed right next to the iostream object and the buffer, meaning we can easily #ifdef them away.