Custom Inspector elements

I know i can use the inbuilt buttons and textboxes and stuff to create custom inspectors for my scripts. Can i create custom layout elements also? Like a grid where i can click on and stuff happens ?

Like this? Unity - Scripting API: PropertyDrawer

You can use DrawTexture to draw a grid texture.

mmm… just a texture is not what i want. I want inspector where i give width and height, this will create me a grid, and inside the grid i can click on the squares and like numbers or what not will appear and change. And then i can use this data in grid to create something in the scene/game view.

For simple, you may have a grid of buttons using auto layout with BeginHorizontal/BeginVertical.