Allow use of objects implementing ArrayAccess interface.

Hello!

These modifications allow the use of data objects which implement the ArrayAccess interface as context data.
The related test class has been extended and tests ran without problems.

Greetings,
kriss0r