Fix array allocation for non-continuous cpu numbers
BUG: 376537 FIXED-IN: 5.8.6
Differential Revision: https://phabricator.kde.org/D4640