You can find an example of how to write a simple Arnold procedural here.
The best way to support custom procedurals in MtoA is to write a MtoA extension. When no extension exists, it's necessary to inform MtoA that a new type of Maya node can be created for this procedural.