There is a Shell Script task that can specify Script path.
If the script file is in the current repository of build (Get source), you can click … button to select file, otherwise you need to specify the path manually.
Regarding arguments, you can specify it in Argument input box.

Update:
You can custom build task to define an input with picklist type, simple sample:
"inputs": [
{
"name": "ConnectedServiceName",
"type": "connectedService:AzureRM",
"label": "Azure subscription",
"defaultValue": "",
"required": true,
"helpMarkDown": "Select the Azure Resource Manager subscription"
},
{
"name": "Action",
"type": "pickList",
"label": "Action",
"required": false,
"helpMarkDown": "Action to be performed on the App Service. You can Start, Stop, Restart, Slot swap or Install site extensions for an Azure App Service",
"defaultValue": "Swap Slots",
"options": {
"Swap Slots": "Swap Slots",
"Start Azure App Service": "Start App Service",
"Stop Azure App Service": "Stop App Service",
"Restart Azure App Service": "Restart App Service",
"Install Extensions": "Install Extensions"
}
}
}
Regarding custom build task, you can refer to Add a build task
You can retrieve the data from server (e.g. web api) and populate to that input box.
Some threads to bind source.
How to display “Area path” in VSTS build task input PickList?
Use the ServiceEndpoinr.Uri as/in the SourceDefinition.Endpoint