When the array is too large, we should avoid using 'apply' as it may result in an 'too many arguments provided for a function call' error Differential Revision: https://phabricator.services.mozilla.com/D184200