You can do this:
#!/bin/bash
declare -A sitesite=() themetheme=()
add_site() {
local shortcut=$1
site[$shortcut]=$2
theme[$shortcut]=$3
}
while IFS= read -r line; do
case "$line" in
shortcut=*)
# IFS== read -r __ shortcut <<< "$line"
shortcut=$_shortcut=${line#*=}
;;
site=*)
# IFS== read -r __ site <<< "$line"
site=$_site=${line#*=}
;;
theme=*)
# IFS== read -r __ theme <<< "$line"
theme=$_theme=${line#*=}
add_site "$shortcut""$_shortcut" "$site""$_site" "$theme""$_theme"
;;
esac
done < your_filefile.ini
Test output with added echo "$@"
on function:
x1 example1.com alpha
x2 example2.com beta