Initial complete implementation of array access

Uses the new sdb_a* api
Added some tests to ensure never gets broken