I have to create a texture using 4 different elements (call them A,B,C,D or whatever you want) on a 6x7 grid. The goal is to obtain a pattern with the least repetitions of the same element in horizontal, vertical and diagonal directions, especially, if possible, should be avoided to repeat the same element in adjacent blocks. I think there should be different solution to this, just answer with what you came up with.
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Starting from the nucleus
$$a b a\\ b c b\\ a b a\\$$
add "layers" of two characters alternating onto the nucleus. For example, the next iteration will be
$$c d c d c\\ d a b a d\\ c b c b c\\ d a b a d\\ c d c d c\\$$
This array can be extended infinitely, and all elements of this infinite array will have neighbours in all 8 directions that are different from itself, except at the corners.
$$c d c d c d\\ a b a b a b\\ c d c d c d\\ a b a b a b\\ c d c d c d\\ a b a b a b\\ c d c d c d\\$$
Simply take a 6x7 subset of this infinite array at any position where no corner exists to produce an answer.
Here is one:
$$a b c d a b\\ b c d a b c\\ c d a b c d\\ d a b c d a\\ a b c d a b\\ b c d a b c\\ c d a b a d\\$$
In the row you must have 2 repetitions and in the column 3.