@arunabha bhattacharya You can use the .Net core configuration : Microsoft.Extensions.Configuration. In the function you may add a parameter of type Microsoft.Azure.WebJobs.ExecutionContext context, where you can then build an IConfigurationRoot :
var config = new ConfigurationBuilder()
.SetBasePath(context.FunctionAppDirectory)
.AddJsonFile("local.settings.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();
Please refer to : https://www.koskila.net/how-to-access-azure-function-apps-settings-from-c/
Or, if you just want to avoid manual entry in the portal you may consider azure cli as an option. You can also consider ARM Template.
I am sharing couple of relevant reference link as how to parameterize the app settings in the script :
https://blogs.perficient.com/2016/03/17/azure-arm-template-define-web-app-application-settings/
https://microsoft.github.io/AzureTipsAndTricks/blog/tip163.html
https://kalcik.net/2019/11/21/merge-azure-app-service-app-settings-in-arm-template/
If the answer helps, please "Accept the answer" and " up-vote" so that it helps others in the community!