Un-displacing an array
Here’s a function to get the underlying array on which a displaced array is based:
(defun undisplace-array (array)
"Return the fundamental array and the start and end positions into
it of a displaced array."
(let ((length (length array))
(start 0))
(loop
(multiple-value-bind (to offset) (array-displacement array)
(if to
(setq array to
start (+ start offset))
(return (values array start (+ start length))))))))
From an article by Erik Naggum.