You can always pass all the script arguments to a function..
fn "$@"
By default, variables are global in the subshell in which they are created.
If you want to define a variable in a function and don't want it to be visible outside it, use the "local" bultin command.