Generate a looping array
Jelly, 12 bytes

ż~Ṣ€FxA$;L$U


Try it online!

Background

Consider the pair of integers n, ~n, where n &geq; 0 and ~ denotes bitwise NOT, i.e., ~n = -(n + 1).

By placing n copies of n to the left of n + 1 copies of ~n, if we start traversing the pointer array from the rightmost ~n, we'll traverse all 2n + 1 elements and find ourselves at the left of the leftmost n.

For example, if n = 4:

X  4  4  4  4  -5 -5 -5 -5 -5
                            ^
            ^
                         ^
         ^
                      ^
      ^
                   ^
   ^
                ^
^


For the special case n = 0, the element n itself is repeated 0 times, leaving this:

X -1
   ^
^


For each integer k in the input, we can form a pair n, ~n that contains k by setting n = k if k > 0 and n = ~k if k &lt; 0. This works because ~ is an involution, i.e., ~~k = k.

All that's left to do is chain the generated tuples and prepend their combined lengths, so the leftmost element takes us back to the rightmost one.

Examples

[1] -&gt; [3, 1, -2, -2]
[2] -&gt; [5, 2, 2, -3, -3, -3]
[-2] -&gt; [3, 1, -2, -2]
[2, -2] -&gt; [8, 1, -2, -2, 2, 2, -3, -3, -3]
[2, 2, 2] -&gt; [15, 2, 2, -3, -3, -3, 2, 2, -3, -3, -3, 2, 2, -3, -3, -3]
[2, -4, 2] -&gt; [17, 2, 2, -3, -3, -3, 3, 3, 3, -4, -4, -4, -4, 2, 2, -3, -3, -3]
[3, -1, 2, -2, -1, -5] -&gt; [26, 4, 4, 4, 4, -5, -5, -5, -5, -5, -1, 1, -2, -2, 2, 2, -3, -3, -3, -1, 3, 3, 3, -4, -4, -4, -4]
[-2, -2, 10, -2, -2, -2] -&gt; [36, 1, -2, -2, 1, -2, -2, 1, -2, -2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, 1, -2, -2, 1, -2, -2]
[-15, 15, -15] -&gt; [89, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15]
[1, 2, 3, 4, 5] -&gt; [35, 5, 5, 5, 5, 5, -6, -6, -6, -6, -6, -6, 4, 4, 4, 4, -5, -5, -5, -5, -5, 3, 3, 3, -4, -4, -4, -4, 2, 2, -3, -3, -3, 1, -2, -2]


How it works

ż~Ṣ€FxA$;L$U  Main link. Argument: A (list of integers)

 ~            Yield the bitwise not of each k in A.
ż             Zipwith; pair each k in A with ~k.
  Ṣ€          Sort each pair, yielding [~n, n] with n ≥ 0.
    F         Flatten the list of pairs.
       $      Combine the previous two links into a monadic chain:
      A         Yield the absolute values of all integers in the list.
                |n| = n and |~n| = |-(n + 1)| = n + 1
     x          Repeat each integer m a total of |m| times.
          $   Combine the previous two links into a monadic chain:
         L      Yield the length of the generated list.
        ;       Append the length to the list.
           U  Upend; reverse the generated list.