For traits, it's trivially simple, it's just an array you add text to, but you're talking about specialization, not traits if you're mentioning mage/alchemist. And yes, the game supports only 1 specialization, you would need a mod to allow for multiple, as it's a single text field and the game only expects a single text field in all the locations it applies the specialization's attributes.
For siblings, you can add as many as you want, the game's code looks like this:
if entry.siblings.size() > 0:
text += '\n[center]Siblings[/center]\n'
for i in entry.siblings:
entry2 = relativesdata[i]
if entry2.state == 'fetus':
continue
if entry2.sex == 'male':
text += "Brother: " else:
text += "Sister: "
text += getentrytext(entry2) + "\n"
So to add a sibling, you just need to edit the state.relativesdata appropriately, primarily you need to:
1. add id to siblings array for each slave.
2. Make very sure that the id you enter does exist in the relativesdata object, and has all expected variables defined. For mother/father, that can be -1 to say they're unknown. However, every id you reference in any entry in relativesdata has to have an associated object for that id that is valid.