You could declare the array as global in the class, or save it in the $GLOABALS object to be able to access it from within the class.
See: https://www.php.net/manual/en/reserved.variables.globals.php
and: https://www.php.net/manual/en/language.variables.scope.php
That should help you understand how variable scoping works in php so you can access data from different locations.