Added array casting to Elementwise and Aggregation like operations.