Add operator [] and its definition