Just like indexOf(), but returns an array of all occurrences. Works on both strings and buffers.
Get indices of all values in array equal to specified value, like Array.indexOf().