How to set to game objects's position from 2 different game objects arrays equal to each other?

Hello everyone, I am trying to compare a game object’s original position (starting position) to its current position. I start off by getting all of the game object’s tagged with “puzzle” then throw them into a game object array (this should hold of their starting positions) then when the player dies I then create a new game object array which gets me the current position of the game objects tagged with “Puzzle”. What i am trying to do is compare the starting position to the current position and reset the active object in the scene to the original position, as if we were to restart the level. Can anyone help with this? Thanks in advance!

public class ResetPuzzle : MonoBehaviour
{
    public bool dead = false;

    private Vector3 currentCheckPoint;
    private GameObject Player;
    private GameObject[] puzzle;
    private GameObject[] activeObjects;

    // Use this for initialization
    void Start()
    {
        puzzle = GameObject.FindGameObjectsWithTag("Puzzle");
        Player = GameObject.FindGameObjectWithTag("Player");
    }

    // Update is called once per frame
    void Update()
    {
        if (dead == true)
        {
            activeObjects = GameObject.FindGameObjectsWithTag("Puzzle");
            DisablePuzzle();
            PuzzleReset();
        }
    }
    public void DisablePuzzle()
    {
        foreach (GameObject active in activeObjects)
        {
            active.SetActive(false);
        }

    }
    public void PuzzleReset()
    {
        foreach (GameObject p in puzzle)
        {
            foreach (GameObject a in activeObjects)
            {
                if (a.name == p.name)
                {
                    a.GetComponent<Transform>().position = p.GetComponent<Transform>().position;
                    a.GetComponent<Transform>().rotation = p.GetComponent<Transform>().rotation;
                    a.SetActive(true);
                }

            }
        }

        dead = false;
        Respawn();
    }

    void Respawn()
    {
        Player.transform.position = currentCheckPoint;
    }
}

I bet this is the answer to your question C# store compare start position and actual position - Questions & Answers - Unity Discussions or https://domyhomeworkonline.net also describes similar code.