1) You can declare/initialize the global variables using the var keyword in the global scope (outside of a function), and then pass the variables in by reference to your function IsWithinGeofence():
var myVar1 = 1; // default value not necessary ( i think... )
var myVar2 = 2; // " "
var myVar3 = 3; // " "
var1 = PointsOfInterest[i].lat;
var2 = PointsOfInterest[i].lng;
var3 = i;
alert(myVar1 + " " + myVar2 + " " + myVar3);
2) You can add "i" as a property of PointsOfInterest, return the object, and set the value of a new object in the global scope equal to the return value of your function:
code is untested in both cases, but should work...just giving you the basic idea...
PointsOfInterest[i].i = i;
var newObject = IsWithinGeofence(point);
alert(newObject.lat + " " + newObject.lng + " " + newObject.i );
There's a couple other ways to do this as well, but see if you like those ideas first...