Add npm tests for array indexing and array creation