Define and attach behaviours on collections