Querying Datalog with Arrays: Design and Implementation Issues