Cleanup accounts array so there are no sparse values (i.e. empty values in the middle, this is not compatible
with many of the web3 libraries (web3.js and viem)).
Returns copy of array which makes 0x00..., null, undefined and empty string mark the end of the array
This is useful for cleaning up the array of accounts.
Cleanup accounts array so there are no sparse values (i.e. empty values in the middle, this is not compatible with many of the web3 libraries (web3.js and viem)).