refactor such that any data strcuture (contained in an array) can be used
refactor such that any data strcuture (contained in an array) can be used

stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math