Use std::array and initializer lists instead of C-arrays and a loop to reset the register values on CPU reset.