select should return arrays

Closes #340