If you mainly want to learn, then implementing your own Vec Mat types might be fun :-).
But if you want to use this in production code, I would think twice whether it is worth reinventing the wheel, it will likely be hard to come just remotely close to the capabilities and performance of numpy.
If you would like to have the named access (.x .y etc.) then I suggest you take a look at numpys record arrays. Structured arrays — NumPy v1.26 Manual . They probably come very close to what you want and all the logic already exists (vector math, matrix multiplications etc).
If you want to hide the truth from your api consumer you can make thin wrapper function dubbed Vec2, Vec3, … and create a record array in them. This hides most of the implementation detail and provides a more familiar vector / matrix creation interface. Swizzling, i.e. epxressions like vector.xxyz, would be an interesting challenge to tackle though …
as I said before, using huge numpy ndarray api for single vectors are bad for readability and debugging.
Also ndarray has implicit broadcast and may produce more errors.
Also vec2 has convenient .x .y .zyx and other properties.
I want to use some code from shadertoy for image filtering.
Writing few functions are not “reinventing the wheel”.