Sahil gill

Results 3 issues of Sahil gill

Closes #1662 Note that this is currently based on the vector-modify branch because of several essential bug fixes and changes.

This PR refactors the AMT mplementation by replacing internal iteration via `for_each_mut` with external iteration using `iter_mut` and adds a test case showing the use case of the `iter_mut` function...