Changing a certifcate+key algorithm by dropping & recreating with the same names

I can't think of a very good way to do what you are asking for, but, if you know that your input file is going to contain space-separated tokens that are valid syntax for bash, then something like the following could work:

declare -a arr="($(<myfile))"

Use this:

IFS=$'\n' arr=( $(xargs -n1 <file) )
  • IFS=$'\n' sets bashs internal field separator to newline.
  • arr=( ... ) the array definition.
  • xargs -n1 <file xargs reads the file with a maximum of 1 argument. The string in quotes stay together, because they are read as arguments.

The output (one element per line):

$ printf "%s\n" "${arr[@]}"
a
bc
d e
f

Export the configuration:

drush cex

then change the langcode in sites/default/files/config_HASH/sync and import the configuration again:

drush cim

Look for all non english langcodes that are in the base sync folder (or non default langcode, if you have another default language).