Can I at least get number of elements in array (at compile time)?
Length(TMenuDef); you can set the length with SetLength()
Note the const structure you use is probably wrong.
In general you can get at the resources Through Tmenu.Items[].TMenuItem
Through Tmenu.Items[].TMenuItem
Count := TMenu.Items.count or submenu: TmenuItem.Items.Count
Name is TMenu.Items[index].Name etc. You can iterate through all menu entries