[2.4][PropertyAccess] Fixed getValue() when accessing non-existing indices of ArrayAccess implementations

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This PR backports two test refactoring commits from the master branch. The third commit is basically the same as #10946.