you would need a function. (or wait until VHDL gets union types).
recall that my_array'range will return 0,1,2,...,N-1
recall that my_array(my_array'low)'range will return K-1,...,2,1,0
and the output is of size (my_array'length*my_array(my_array'low)'length-1 downto 0).
however, VHDL requires the function's input types be known. as a result, a single function cannot be used for any width/depth combo -- if you have 8b and 9b arrays, you'd a version of the function for each one, even through the code could otherwise be the same...