Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs