// I actually did it by creating a vararray and then making an array filled with marker objects.
vararray[i] = L.marker(locationarray[i].location).addTo(map);
vararray[i].bindPopup('<div id="hello'+ i +'">' + whatevervar + '</div>')
// then i added divs outside the map with an onclick function that triggered the objects popup
// the id i pass in as a parameter is numeric because it is the one i gave to the divs outside the map when i initialized them in a for loop. I also show and hide the divs outside the map depending if their coordinates are in the boundaries of the map. You can do that with the 'move' function.
$.example = function (id) {
vararray[id].openPopup()
}
Worked for me