Remove unnecessary array

To save code size and improve performance.
Merge pull request #2921 from tricknotes/remove-unnecessary-array

Remove unnecessary array