utility function std::string -> std::array