Assign types to collections and collection elements.