If you don't know ahead of time what size you need for the arrays, then you need to use a dynamic array type instead of std::array
(which is only for static size arrays). The class you can use is std::vector
(see docs). This would make your lines look like this:
typedef map<string,set<MatchRecordPointer>> PlayerHistoryMap;
typedef vector<PlayerHistoryMap> ArrayOfPlayerHistoryMap;
typedef vector<ArrayOfPlayerHistoryMap> Array2DPlayerHistoryMap;
Array2DPlayerHistoryMap PlayerMatchHistory;