fix(deprecation): the deprecation wrapper correctly handles array access

When array access is used on the wrapper, the wrapper now checks the wrapped object for ArrayAccess. If found, it uses that instead of property access. This also emits deprecation warnings on array access, which were left out accidentally.

Fixes #7017 and #6917

(@cash I assume you did not purposefully leave out warnings on array access)