I am not going to go into the grammar etc, but will try to explain why and what it does for statement.
「いいんじゃよ、まる子。おじいちゃんは別にただまる子をかわいがっているだけじゃ」
The 「別に」in this sentence really is not needed, but from the statement from Maruko that she was sorry, it seems like the writer put it in to convey or add some more feeling to Maruko that an apology is not necessary.
Eg,
「別にいいよ」 Loosely translated as [Its Ok, I don't mind]
This part where 「ただ」is used.
「おじいちゃんは別にただまる子を」
Could be written like this and serve the same meaning, even without the 「別に」
「おじいちゃんはただ」
Translated, [I (Granddad) just.......
(Maruko)]
So with the 「別に」in or out of the sentence the later part of the translation is really much the same.
I [Granddad]
just adore you.
「いいんじゃよ、まる子。おじいちゃんは別にただまる子をかわいがっているだけじゃ」
So the overall translation to get the feeling of what Granddad is saying even though the first part basically just says [its OK, Maruko], adding the really inputs the feeling of what the「別に」adds to the sentence.:
Really, its OK, Maruko. I [Granddad]
just adore you.
The 「別に」just adds that feeling that Granddad really doesn't mind in the Japanese version and really is quite hard to convey that feeling into a literal English translation.
EDIT, I wrote this a few hours ago, but had a work issue to deal with, even with all the good answers I will post anyway.