lib: use lists for lists instead of arrays

This was a made during development to get type errors a bit earlier, and
more localized.
test: adapt test to use list literals