refactor operator[]

 * add `assert`
 * add `inline`