How to pass array data from public js data when redirect to custom page

I have a function method in public js file which contain button when click it redirect to custom page ,and when click button i want to pass data array to custom page.
if any one can help me