Added normal array & for loop in offsetValues

Replaced dense array in `offsetValues` function to use a normal array
and for loop to prevent the call stack from exceeding it’s limit.
Merge pull request #16 from JonKoops/master

Added normal array & for loop in offsetValues