Be aware though, that there might currently be a bug involving sub resources and arrays: Duplicate() not making a unique copy of my custom resource
Edit: If you are doing things with arrays in custom resources, that git thread may be helpful since it gives a workaround.