Generalize broadcastable trait to variadic operands. Update the documentation that still talked about element type as part of broadcastable trait (that bug was already fixed). Also rename Broadcastable to ResultBroadcastableShape to be more explicit that the trait affects the result shape (it is possible for op to allow broadcastable operands but not have result shape that is broadcast compatible with operands).
Doing some intermediate work to have getBroadcastedType take an optional elementType as input and use that if specified, instead of the common element type of type1 and type2 in this function.
This is a bit counter-intuitive to me: the result type is naturally the same as type1 and type2 if not explicitly providing an elementType. What about: "If elementType is not provided, this requires type1 and type2 to have the same element type; otherwise, the given elementType will be used as the result's element type, ignoring element types from type1 and type2."