implement ArrayAccess and some tests, refs #1