Just one note:
You might want to also have a look at Uniform Buffer Object.
Those could be more up to the task when it comes to feeding structured data to your shader, since they allow for aggregate data types, such as vec4 and mat4 directly in them and you therefore do not need a custom texture lookup function to build matrices from texel samples.
You also do not need a backing texture and sampler, just a Buffer Object.
UBOs however need a defined static (max.) size in the shader.
So if you know you are going to have at max 256 objects, you can use the following:
#define MAX_OBJECTS 256
struct Object {
mat4 modelviewMatrix;
mat4 projectionMatrix;
mat4 normalMatrix;
}
layout (std140) uniform Objects {
Object objects[MAX_OBJECTS];
}
The layout with std140 in memory (in the Buffer Object) on your Java side in this particular case is column-major, tight packing without any padding.
And to retrieve the modelview matrix (for example), you can just use:
objects[theIndex].modelviewMatrix
MAX_OBJECTS is also just an upper bound on the maximum number of objects that can be contained in the UBO. You can always glBufferData just a subset of the data to the Buffer Object and access that subset in the shader.