BNW assumes there are EXACTLY three policy branches that are actually ideologies - this is hard-coded in the DLL ... as are the type names. SocialPolicyPopup.lua makes a few assumptions about how many level 1, 2 and 3 tenets (policies) there are - probably not a good idea to change the number in the base game without digging into the popup lua code.
WRT actual policies, the number of, branch types and locations are hard-code in the popup. So while you can re-purpose the branches, you can't add to or delete them. Within each branch there are more hard-coded assumptions. Every branch MUST have an opener, a finisher and at least one other policy. The max policies a branch can have is six (two columns of three rows) and IIRC the lua crashes if you put policies outside of the expected co-ordinates or two policies at the same co-ordinates in the branch if a connection is needed (although even without the connection, one of them will be un-selectable)
CivV, the most moddable civ yet - so long as you don't want to actually change anything