Not sure why my array is not allowed to use a function (OOP)

no, of course not.

it’s really not hard

please update the page now since I changed my post

(it’s forum policy not to provide full code solutions here as you guessed)