Its poorly documented but everything you can do with gen you can do with the codebox. I’ve been trying to learn to use gen over the past week or two and have the same frustrations. The GenExpr vignette has some information.
If you have the latest version of Max you can quickly sketch something out with objects in gen and the "code" sidebar will show you the syntax, then you can use bits of that in codebox.
it’s all the gen operators that you can write inside the codebox. There are a few syntax changes between the boxed and the code versions of each operator, if you’re unsure how the syntaxe changes, you can try (inside a gen subwindow) opening the sidebar, displaying the current gen patcher codebox, and making a simple gen patcher with the operator boxes you want.