Adding a type for converting collections to arrays of ids and back