Add [] impl for array.