How to use lerp on events happening only for one frame?

I have a code that follows this logic:

function Update() {
       if (event happens) {
              for loop through GameObjects array {
                      Lerp the position of 5 to 10 game objects 

              }
        }
}

The problem with that is that the Lerp only happens for one frame, because the triggering event happens only for one frame.

I saw on another site that I could make a Lerp function that would be called while (_isLerping == true), but the problem is I can’t make references to the GameObjects that are within Update() and the if statement, even if I create a variable and assign the object to it.

How am I supposed to use Lerp on events that happen only for one frame?

private bool eventHappened;

	void Update()
	{
		if(eventHappened)
		{
			eventHappened = false;
			StartCoroutine(Lerp());
		}
	}

	private IEnumerator Lerp()
	{
		while(true)
		{
			this.transform.position = Vector3.Lerp(this.transform.position, Vector3.zero, Time.deltaTime * 10);

			// We are at the position, stop this IEnumerator
			if(Mathf.Approximately(this.transform.position.x, 0) && Mathf.Approximately(this.transform.position.y, 0))
			{
				return false;
			}

			yield return new WaitForEndOfFrame();
		}
	}

Hope this helps!!