Update unserialize.js

Added functionality to `unserialize`, will automatically detect regular arrays and convert. Unfortunately, this is slightly inefficienct, but it should work fine.