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, #6917
Merge pull request #7018 from mrclay/7017

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