How to convert ChiP-seq track in .bam file format into an array at fixed bin resolution?
Using deepTools to get a bin size of 10 and 20 threads:

bamCoverage -of bedgraph -bs 10 -b input.bam -p 20


You'll probably prefer the default bigWig format if you need random access or to use something like IGV.

Regarding the options to igvtools, -w is equivalent to -bs/--binSize in deepTools and denotes the resolution of the output data. -e (it's the same option in bamCoverage) denotes whether and how much to extend a read in its 3' direction. This done such that the output represents the sequences fragments. -z is specific to things like bigWig files (and apparently tdf files), where there are precomputed values that IGV will load as you zoom out (the various resolutions are "zoom levels", which is parlance taken from the bigWig format).