computeForestLeafIndices function

Compute vector of forest leaf indices