Jolf, 13 bytes
ΆFi liγhj_γgi
A tranpilation of the JavaScript answer.
Explanation:
ΆFi liγhj_γgi
Ά ternary add
Fi i[0],
`li i sliced
γhj γ = j + 1
_γ to -γ
gi and the last of i
A more interesting post-question version:
ΆFi]ihjYgi