get_last_element function

Create a data accessor retrieving the last element of an array