Setting variable when method called

private void EnemySpawn(){
enemy = new GameObject(enemyName);
arms = new GameObject (“arms”);
arms.GetComponent().isTrigger = true;
arms.GetComponent().size = new Vector3 (armsColliderSizex, armsColliderSizey, armsColliderSizez);
enemy.GetComponent().mesh = bodyMesh;
enemy.GetComponent().material.mainTexture = bodyMaterial;
enemy.GetComponent().size = new Vector3 (bodyColliderSizex, bodyColliderSizey, bodyColliderSizez);
enemy.GetComponent().center = new Vector3 (0, bodyColliderCentery, bodyColliderCenterz);
enemy.GetComponent().isTrigger = true;
enemy.transform.position = new Vector3(bodyTransformPosx, bodyTransformPosy, bodyTransformPosz);
arms.transform.parent = enemy.transform;
arms.transform.position = new Vector3(bodyTransformPosx, armsTransformPosy, armsTransformPosz);
I basically want to just put EnemySpawn(x,y,z) in void Start instead of manually creating every single one and setting the coordinates within the method. Is this possible?

You can do it more easily defining the arms offset relative to the body in a constant variable and assigning it to arms.localPosition, and assigning the passed coordinates to the enemy transform.position:

public Vector3 armsOffset = new Vector3(0, 1.1, 0.5); // relative arms position

private void EnemySpawn(float x, float y, float z){
       enemy = new GameObject(enemyName);
       arms = new GameObject ("arms");
       enemy.transform.position = new Vector3(x, y, z); // assign the body position
       arms.transform.parent = enemy.transform;
       arms.transform.localPosition = armsOffset; // set the relative arms position

But the best solution by far is to create your enemy in the Editor, then make it a prefab: create the empty object and attach the scripts, components, meshes, colliders etc. Test it, do any fine tuning you want and, when everything is ok, drag it to the Project View to make it a prefab. Using a prefab, your EnemySpawn function would be reduced to this:

GameObject enemyPrefab; // set this variable in the Inspector

private void EnemySpawn(float x, float y, float z){
    Instantiate(enemyPrefab, new Vector3(x, y, z), Quaternion.identity);