Although the major collection types of Core Foundation--arrays, dictionaries, sets, bags, and trees--have characteristics in common, they each have distinct ways of organizing the data elements they contain and, in some cases, restricting which elements they contain.