As long as you do modulus on the ID by the number of buckets (which is pre-determined), yeah. You cannot just use the ID itself, if I have 5 records and the ids are:
1234523533
9922883
42
1
23456234134
I suppose I could be safe and use a 10000000000 element array, but...