Allow subarray indexing as input to pure and elemental functions

Here was my suggestion for expanding the functionality of elemental procedures.