Support non-array thunk collections

This adds support for arbitrary thunk collections, such as objects.