Adds [] and []= methods