Custom editor for component composed objects like gameobject and animator?

I want to create a component composed object similar to gameobject and animator. Is there already an attribute in place for that? Or something I can copy and paste with few modification?

Bump.