The $data attribute will typically be the $_POST structure, but can be any appropriately structured array
The optional $index attribute is the counter for multiple elements of the same type that might exist in source data.
The convention for the method name for the element setting is:
setComplexAttributes_element_class_name