cp panel entry assets element sorting
Found out how to do this. If anyone else needs something similar then adding the new {{ jsClass }} part of input template into a function and calling it after extra elements are added also makes them sortable.