I hope i got you right:
Put all your "elements" in a family.
Add instance variable "id" for the family and give each element an id.
Then you need a config to check what new element you'll get.
You can either save it manually in an array (X axis would be the element id, Y Axis the element id of the element you combined and Z the result).
In this cases I like to create my own "Config" Plugin where I save all the data in a JSON Object and return it as JSON String to C2 when needed. (normally I use Hash Plugin to do this, but you could also use an array stucture).