Implemented GetNonzerosSlice operations for virtual machine