Refactor 1d array indexing
Add test for any layout indexing
Add support for primitive array slicing