Assert that array indexing is inbounds