Adding to an Array and then storing and using the Array in a Chrome Extension across websites

I have the following code

let exampleArr = JSON.parse(localStorage.getItem("persons") || "[]");

let input = prompt("Write Any String");

exampleArr.push(input);

localStorage.setItem("exampleArr ", JSON.stringify(exampleArr ));

console.log(exampleArr);

To read user input and store into an array. However, because this uses local storage the Array is different from website to website. How would I make this work with ALL websites where if I add something to the exampleArr it will be like that for ALL websites? I have tried using the Chrome Storage Sync documentation found here

https://developer.chrome.com/docs/extensions/reference/storage/

But end up getting errors.