How to split bigint into 32 bit chunks and recombine them?

How do I split a large bigint into a 32 bit number array? I also need to recombine them to the bigint again.

I have an api that takes an array of max 32 bit integers and returns an array of max 32 bit integers. But I have a large bigint number that I need to pass into and receive back from this api.

How do I do the splitting and recombining?