Add loading-from-array test

When I added this test, I saw a few bugs. I commented in the code to show you what I thought.