Implement Index/IndexMut for [T]

Closes #16529
auto merge of #18698 : japaric/rust/index, r=alexcrichton

Closes #16529

r? @aturon