Generalized array arithmetic for ragged arrays with named margins
