How do I pre fill data in ejs?

Yes, I just wanted to explain with a demo how to use ejs as your example had zero javascript included.
If you’re fetching the list of names from the database with ajax then you can do something like this:

var templateString = document.getElementById('template').innerHTML
var template = ejs.compile(templateString)
$.ajax('/people').then(function(people) {
  var html = template({ people: people })
  document.getElementById('wrapper').innerHTML = html;
})

Or if you have the list when the page loads you can output the JSON directly in the source with php, something like this:

var people = <?php json_encode($people) ?>;