switched to zsh/regex and zsh/mapfile

many operations moved to builtin zsh internals, improving speed
also fixes to the username detection and to the losetup check