Japt -hP, 16 bytes
Takes input as a 2D character array.
ÇiUËouÃíUî"_-"1c
ÇiUËouÃíUî"_-"1c :Implicit input of 2D character array U
Ç :Pop last element, pass it through the following function & push back
i : Prepend
UË : Map the remaining elements of U
o : Modify last
u : Uppercase
à : End map
í : Interleave
Uî"_-" : Mould "_-" to length of U
1 : End prepend
c : Flatten
:Implicitly join and output last element
Japt -hP, 16 bytes
Takes input as a 2D character array.
ÇiUËouÃíUî"_-"1c
ÇiUËouÃíUî"_-"1c :Implicit input of 2D character array U
Ç :Pop last element, pass it through the following function & push back
i : Prepend
UË : Map the remaining elements of U
o : Modify last
u : Uppercase
à : End map
í : Interleave
Uî"_-" : Mould "_-" to length of U
1 : End prepend
c : Flatten
:Implicitly join and output last element