gen: refactor and add plugin helper headers
gen: generate functions enum