fixed implementation arraytype for sqlite (TODO: replace with a groups table)