Remove unnecessary array allocation