Need help with data structure selection/implementation

So I am fairly new to cuda and am looking for some advice as to what data structure/library/whatever else I should use to implement my program. Note that I have not yet installed any additional libraries to the Cuda system. My program is as follows: I have a list of objects, and each of these objects has a corresponding position in a 2D array of vectors (this allows for multiple objects to be stored in a particular position within the 2D array). I begin by iterating over the list, and for each object on the list, I obtain its position in the 2D array, and iterate over neighboring vectors in the 2D array. Below is an hopefully clearer example:

A - B - C - D

Step 1) iterate over list and obtain object (using selection of A as an example)


[ (A, B), ( D );
( ) , © ]

Step 2) Locate the vector containing A in the matrix (A.row would be 0 as would A.column)
Step 3) Iterate over neighbors over some neighbors of A, say the vector to the right and the vector below (in this case the vector containing D and the null vector)

Any help as to how I should proceed in implementing this is appreciated.