If these items are from the database, you could add a field to the data type that is called sort order and be of type number and use that for sorting the list and so if you want to switch E with F you simply swap their sort order numbers in the DB
If these lists are not from the database, you could look into some plugins that do list manipulations of which I believe there are a few.
Assume that you have a list of text in state called text :
If you want to replace item and keep order of elements
β the way to do that by using find and replace you will use find and replace as you see
[1] β with value you want to replace
[2] β value you want to add to the list