Numpy Structured Array Indexing Javascript Snake