General method for new structure

Probably what you are searching for is this list of methods to implement:

https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-array