There's a better way to do getAllAsArray