Improve post processing infrastructure
Post-processing in index functions is currently limited by the requirement that the result of the calculation is stored in the final result cube already before post-processing. This has two unfortunate consequences. First, the shape of the pre-result must already conform to the shape of the final result, preventing the passing of any extra information that is only used in the post-processing. Second, the pre-result must already be in the form of a single array, which can be too limiting under certain circumstances.